Add a check for mobile click dragging

master
sigonasr2 4 years ago
parent cc1644d8c4
commit d549bce29a
  1. 8
      dot.svg
  2. 4
      game.js

@ -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

@ -950,7 +950,7 @@ function clickEvent(e) {
setMoveMode(true)
}
if (gridModeIsAvailable()&&e.button!==0) {
if (!MOBILE&&gridModeIsAvailable()&&e.button!==0) {
setMoveMode(true)
e.preventDefault()
}
@ -1028,7 +1028,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…
Cancel
Save