mouse event only on sceneDiv
This commit is contained in:
parent
4281bf1735
commit
3175e7b7ad
@ -268,7 +268,7 @@ let rY0 = 0
|
|||||||
let clientX0 = 0
|
let clientX0 = 0
|
||||||
let clientY0 = 0
|
let clientY0 = 0
|
||||||
|
|
||||||
document.onmousedown = function(event) {
|
sceneDiv.onmousedown = function(event) {
|
||||||
mousedown = true
|
mousedown = true
|
||||||
rX0 = parseInt(getComputedStyle(screenRow).getPropertyValue("--rX"))
|
rX0 = parseInt(getComputedStyle(screenRow).getPropertyValue("--rX"))
|
||||||
dy0 = parseInt(getComputedStyle(screenRow).getPropertyValue("--rY"))
|
dy0 = parseInt(getComputedStyle(screenRow).getPropertyValue("--rY"))
|
||||||
@ -276,7 +276,7 @@ document.onmousedown = function(event) {
|
|||||||
clientY0 = event.clientY
|
clientY0 = event.clientY
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onmousemove = function(event) {
|
sceneDiv.onmousemove = function(event) {
|
||||||
if (mousedown) {
|
if (mousedown) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
@ -301,11 +301,11 @@ document.onmousemove = function(event) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onmouseup = document.onmouseleave = function(event) {
|
sceneDiv.onmouseup = document.onmouseleave = function(event) {
|
||||||
mousedown = false
|
mousedown = false
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onwheel = function(event) {
|
sceneDiv.onwheel = function(event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
let tZ = parseInt(getComputedStyle(screenRow).getPropertyValue("--tZ"))
|
let tZ = parseInt(getComputedStyle(screenRow).getPropertyValue("--tZ"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user