get hasReserve() {
return false;
}
-
get noAnimate() {
return true;
}
+ get clickOnly() {
+ return true;
+ }
doClick(coords) {
if (
}
}
- 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.playPlusVisual(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"
+ const rc =
+ document.getElementById(this.containerid).getBoundingClientRect();
+ const rotate = rc.width < rc.height; //"vertical screen"
return {
x: this.options["bsize"],
y: this.options["bsize"],