projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt to handle smartphone drag and drop
[vchess.git]
/
public
/
javascripts
/
components
/
game.js
diff --git
a/public/javascripts/components/game.js
b/public/javascripts/components/game.js
index
5c1e602
..
84976b0
100644
(file)
--- a/
public/javascripts/components/game.js
+++ b/
public/javascripts/components/game.js
@@
-437,9
+437,9
@@
Vue.component('my-game', {
mousedown: this.mousedown,
mousemove: this.mousemove,
mouseup: this.mouseup,
mousedown: this.mousedown,
mousemove: this.mousemove,
mouseup: this.mouseup,
- touch
down
: this.mousedown,
+ touch
start
: this.mousedown,
touchmove: this.mousemove,
touchmove: this.mousemove,
- touch
up
: this.mouseup,
+ touch
end
: this.mouseup,
},
},
elementArray
},
},
elementArray
@@
-755,7
+755,8
@@
Vue.component('my-game', {
this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare)
? this.vr.getPossibleMovesFrom(startSquare)
: [];
this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare)
? this.vr.getPossibleMovesFrom(startSquare)
: [];
- e.target.parentNode.appendChild(this.selectedPiece);
+ // Next line add moving piece just after current image (required for Crazyhouse reserve)
+ e.target.parentNode.insertBefore(this.selectedPiece, e.target.nextSibling);
}
},
mousemove: function(e) {
}
},
mousemove: function(e) {