Open De-Lac opened 8 years ago
inside the doDrag function there is a control like this:
doDrag
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:
side=='LEFT'
side=='RIGHT'
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
doDrag
function there is a control like this:the control if
side=='LEFT'
is missing... I've not tested my new code withside=='RIGHT'
, but I suggest something like this: