Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.
This repository was archived by the owner on May 27, 2021. It is now read-only.

issue on closing the panel if side=='LEFT' #26

@De-Lac

Description

@De-Lac

inside the doDrag function there is a control like this:

          if (side == RIGHT) 
            { newX = Math.max(0, width - (clientWidth - (lastX - offsetX))); }

the control if side=='LEFT' is missing...
I've not tested my new code with side=='RIGHT', but I suggest something like this:

          if ( self.opened )  
            { // I'm closing
              if (side == RIGHT) 
                { newX = Math.max(0, width - (clientWidth - (lastX - offsetX))); }
              else
                { newX = Math.min(0, width - (clientWidth - (lastX - offsetX))); }   
            }
          else
            { // I'm opening
              if (side == RIGHT) 
                { newX = Math.max(0, width - (clientWidth - (lastX - offsetX))); }
            }   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions