Better mouse event handling (#552)
* Use learnings from touch events in Blockly and apply to the Ev3 sim. Register move and up events on the document rather than the individual element allowing users greater flexibility where they move their mouse once it's down. * Add mouse leave events
This commit is contained in:
1 parent
6e1a613798
commit
b69af383a6
6 files changed
+68
-30
No files matched your search
@@ -93,9 +93,6 @@ namespace pxsim.visuals {
|
||||
}, () => {
|
||||
captured = false;
|
||||
rect.setAttribute('cursor', '-webkit-grab');
|
||||
}, () => {
|
||||
captured = false;
|
||||
rect.setAttribute('cursor', '-webkit-grab');
|
||||
})
|
||||
|
||||
return this.group;
|
||||
|
||||
@@ -67,9 +67,6 @@ namespace pxsim.visuals {
|
||||
}, () => {
|
||||
captured = false;
|
||||
dragSurface.setAttribute('cursor', '-webkit-grab');
|
||||
}, () => {
|
||||
captured = false;
|
||||
dragSurface.setAttribute('cursor', '-webkit-grab');
|
||||
})
|
||||
|
||||
return this.group;
|
||||
|
||||
@@ -66,9 +66,6 @@ namespace pxsim.visuals {
|
||||
}, () => {
|
||||
captured = false;
|
||||
this.handleSliderUp();
|
||||
}, () => {
|
||||
captured = false;
|
||||
this.handleSliderUp();
|
||||
})
|
||||
|
||||
return this.group;
|
||||
|
||||
@@ -66,9 +66,6 @@ namespace pxsim.visuals {
|
||||
}, () => {
|
||||
captured = false;
|
||||
dragSurface.setAttribute('cursor', '-webkit-grab');
|
||||
}, () => {
|
||||
captured = false;
|
||||
dragSurface.setAttribute('cursor', '-webkit-grab');
|
||||
})
|
||||
|
||||
return this.group;
|
||||
|
||||
@@ -47,8 +47,6 @@ namespace pxsim.visuals {
|
||||
}
|
||||
}, () => {
|
||||
captured = false;
|
||||
}, () => {
|
||||
captured = false;
|
||||
})
|
||||
|
||||
return this.group;
|
||||
|
||||
Reference in new issue
Block a user