Add a check for mobile click dragging
This commit is contained in:
parent
cc1644d8c4
commit
cd0bfd92ba
8
dot.svg
8
dot.svg
@ -30,9 +30,9 @@
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer13"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="725.39498"
|
||||
inkscape:cx="421.60463"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cy="404.5924"
|
||||
inkscape:cx="488.12044"
|
||||
inkscape:zoom="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
@ -101,6 +101,8 @@
|
||||
id="layer13"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
inkscape:export-ydpi="5.9316053"
|
||||
inkscape:export-xdpi="5.9316053"
|
||||
id="g1250">
|
||||
<rect
|
||||
y="-6.1897159"
|
||||
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
5
game.js
5
game.js
@ -337,6 +337,7 @@ function toggleDeleteMode(){
|
||||
DELETEMODE=!DELETEMODE
|
||||
if (DELETEMODE) {
|
||||
ITEM_SELECTED=undefined
|
||||
MOVEMODE=false
|
||||
document.body.style.cursor="url('delete_cursor.png') 8 8,auto"
|
||||
} else {
|
||||
document.body.style.cursor="url('cursor.png') 8 8,auto"
|
||||
@ -950,7 +951,7 @@ function clickEvent(e) {
|
||||
setMoveMode(true)
|
||||
}
|
||||
|
||||
if (gridModeIsAvailable()&&e.button!==0) {
|
||||
if (!MOBILE&&gridModeIsAvailable()&&e.button!==0) {
|
||||
setMoveMode(true)
|
||||
e.preventDefault()
|
||||
}
|
||||
@ -1028,7 +1029,7 @@ function releaseEvent(e) {
|
||||
if (gridModeIsAvailable()&&ITEM_SELECTED===undefined) {
|
||||
setMoveMode(false)
|
||||
}
|
||||
if (gridModeIsAvailable()&&e.button!==0) {
|
||||
if (!MOBILE&&gridModeIsAvailable()&&e.button!==0) {
|
||||
setMoveMode(false)
|
||||
e.preventDefault()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user