1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-12 18:42:14 +00:00

allow drag by setting pointer-events on/off

This commit is contained in:
Steven Hugg 2018-09-26 22:34:16 -04:00
parent b88bd781a2
commit 9e9655c1e7
2 changed files with 8 additions and 0 deletions

View File

@ -229,6 +229,7 @@ div.emuoverlay {
}
div.emuscope {
background-color: #333;
pointer-events:auto;
}
div.emuspacer {
width:0;
@ -319,6 +320,7 @@ div.replaydiv {
background-color: #555;
background-repeat: no-repeat;
background-position: 50%;
pointer-events:auto;
}
.gutter.gutter-vertical {
background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');

View File

@ -336,6 +336,12 @@ var VerilogPlatform = function(mainElement, options) {
onDrag: () => {
if (this.waveview) this.waveview.recreate();
},
onDragStart: () => {
$(".emuoverlay").css("pointer-events", "auto"); // allow drag
},
onDragEnd: () => {
$(".emuoverlay").css("pointer-events", "none"); // disallow drag
},
});
// setup mouse events
video.setupMouseEvents();