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:
Sam El-Husseini authored and GitHub committed 2018-05-02 13:54:06 -07:00
1 parent 6e1a613798
commit b69af383a6
6 files changed
+68 -30

No files matched your search

-3
View File
@@ -93,9 +93,6 @@ namespace pxsim.visuals {
}, () => {
captured = false;
rect.setAttribute('cursor', '-webkit-grab');
}, () => {
captured = false;
rect.setAttribute('cursor', '-webkit-grab');
})
return this.group;
-3
View File
@@ -67,9 +67,6 @@ namespace pxsim.visuals {
}, () => {
captured = false;
dragSurface.setAttribute('cursor', '-webkit-grab');
}, () => {
captured = false;
dragSurface.setAttribute('cursor', '-webkit-grab');
})
return this.group;
-3
View File
@@ -66,9 +66,6 @@ namespace pxsim.visuals {
}, () => {
captured = false;
this.handleSliderUp();
}, () => {
captured = false;
this.handleSliderUp();
})
return this.group;
-3
View File
@@ -66,9 +66,6 @@ namespace pxsim.visuals {
}, () => {
captured = false;
dragSurface.setAttribute('cursor', '-webkit-grab');
}, () => {
captured = false;
dragSurface.setAttribute('cursor', '-webkit-grab');
})
return this.group;
-2
View File
@@ -47,8 +47,6 @@ namespace pxsim.visuals {
}
}, () => {
captured = false;
}, () => {
captured = false;
})
return this.group;