shaack / cm-chessboard

A JavaScript chessboard without dependencies. Rendered in SVG, coded in ES6. Views FEN, handles move input, animated, responsive, expandable
MIT License
209 stars 63 forks source link

Is there an option to disable "tap & go" and require "drag & drop" to move a piece? #140

Open actor10 opened 3 months ago

actor10 commented 3 months ago

For one particular program, I would like to only allow "drag & drop" for piece moving. (I want mouse down & up on the same square to mean something special.)

I was working on trapping the mouse actions to cancel the tap & go but thought I would ask if there was a builtin way to disable the tap & go.

actor10 commented 3 months ago

Tracking the input & event callbacks, it feels like what I want to do is on mouse down & up on the same square to have a call to force a "move cancel". I.e., get it back to where the next mouse down is at the "moveInputStarted".

shaack commented 2 weeks ago

Seems to be a good idea for me to make this configureable. a) Only drag & drop b) Only Tap and Go c) Both

But it has not the highest priority. Will give this an "enhancement" tag.