Improved clickDragger behavior.

This commit is contained in:
rainbow napkin 2025-04-09 22:05:59 -04:00
parent 4c54c270d2
commit de7dab5cab

View file

@ -518,6 +518,12 @@ class canopyUXUtils{
drag(event){ drag(event){
if(this.dragLock && this.enabled){ if(this.dragLock && this.enabled){
//If no buttons are being held down
if(event.buttons == 0){
//end the drag
this.endDrag();
}
if(this.leftHandle){ if(this.leftHandle){
//get difference between mouse and right edge of element //get difference between mouse and right edge of element
var difference = this.element.getBoundingClientRect().right - event.clientX; var difference = this.element.getBoundingClientRect().right - event.clientX;