X-Git-Url: https://git.auder.net/?p=xogo.git;a=blobdiff_plain;f=variants%2FHex%2Fclass.js;h=8721227f7ef266480fdbfeddc489a2e87a328329;hp=925507eb2d7074e7ba3388d51bc7eb4df8347b27;hb=ca8a399316d2496c069ea9c6ccf2dc241aeb70ef;hpb=af9c9be34f416500f9e025e28f39fe89a8c7c345 diff --git a/variants/Hex/class.js b/variants/Hex/class.js index 925507e..8721227 100644 --- a/variants/Hex/class.js +++ b/variants/Hex/class.js @@ -32,7 +32,6 @@ export default class HexRules extends ChessRules { get hasReserve() { return false; } - get noAnimate() { return true; } @@ -161,27 +160,6 @@ export default class HexRules extends ChessRules { } } - initMouseEvents() { - const mousedown = (e) => { - if (e.touches && e.touches.length > 1) - e.preventDefault(); - const cd = this.idToCoords(e.target.id); - if (cd) { - const move = this.doClick(cd); - if (move) - this.buildMoveStack(move); - } - }; - - if ('onmousedown' in window) { - document.addEventListener("mousedown", mousedown); - document.addEventListener("wheel", - (e) => this.rescale(e.deltaY < 0 ? "up" : "down")); - } - if ('ontouchstart' in window) - document.addEventListener("touchstart", mousedown, {passive: false}); - } - get size() { const baseRatio = 1.6191907514450865; //2801.2 / 1730, "widescreen" const rotate = window.innerWidth < window.innerHeight; //"vertical screen"