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

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

Open
De-Lac opened this issue Mar 28, 2016 · 0 comments
Open

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

De-Lac opened this issue Mar 28, 2016 · 0 comments

Comments

@De-Lac
Copy link

De-Lac commented Mar 28, 2016

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))); }
            }   

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant