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))); } } ```
inside the
doDragfunction there is a control like this:the control if
side=='LEFT'is missing...I've not tested my new code with
side=='RIGHT', but I suggest something like this: