Skip to content

Commit b9672af

Browse files
committed
Merge branch 'develop'
2 parents 9a232a7 + 596426f commit b9672af

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/renderers/_base.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,18 +1378,18 @@ export abstract class RendererBase {
13781378
const clickDeltaY: number = (this.json.board.clickDeltaX ?? 0);
13791379
const originX = grid[0][0].x;
13801380
const originY = grid[0][0].y;
1381-
const maxX = grid[0][grid[0].length - 1].x;
1382-
const maxY = grid[grid.length - 1][0].y;
1381+
// const maxX = grid[0][grid[0].length - 1].x;
1382+
// const maxY = grid[grid.length - 1][0].y;
13831383
const root = this.rootSvg;
13841384
let genericCatcher = ((e: { clientX: number; clientY: number; }) => {
13851385
const point = rotatePoint(root.point(e.clientX, e.clientY), rotation*-1, centre);
13861386
const x = Math.floor((point.x - (originX - (cellsize / 2))) / cellsize);
13871387
const y = Math.floor((point.y - (originY - (cellsize / 2))) / cellsize);
13881388
if (x >= 0 - clickDeltaX && x < width + clickDeltaX && y >= 0 - clickDeltaY && y < height + clickDeltaY) {
1389-
// try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
1390-
if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
1389+
// // try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
1390+
// if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
13911391
this.options.boardClick!(y, x, "");
1392-
}
1392+
// }
13931393
}
13941394
});
13951395
if (this.options.rotate === 180) {
@@ -1398,10 +1398,10 @@ export abstract class RendererBase {
13981398
const x = width - Math.floor((point.x - (originX - (cellsize / 2))) / cellsize) - 1;
13991399
const y = height - Math.floor((point.y - (originY - (cellsize / 2))) / cellsize) - 1;
14001400
if (x >= 0 - clickDeltaX && x < width + clickDeltaX && y >= 0 - clickDeltaY && y < height + clickDeltaY) {
1401-
// try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
1402-
if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
1401+
// // try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
1402+
// if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
14031403
this.options.boardClick!(y, x, "");
1404-
}
1404+
// }
14051405
}
14061406
});
14071407
}
@@ -2090,18 +2090,18 @@ export abstract class RendererBase {
20902090
const clickDeltaY: number = (this.json.board.clickDeltaX ?? 0);
20912091
const originX = grid[0][0].x;
20922092
const originY = grid[0][0].y;
2093-
const maxX = grid[0][grid[0].length - 1].x;
2094-
const maxY = grid[grid.length - 1][0].y;
2093+
// const maxX = grid[0][grid[0].length - 1].x;
2094+
// const maxY = grid[grid.length - 1][0].y;
20952095
const root = this.rootSvg;
20962096
let genericCatcher = ((e: { clientX: number; clientY: number; }) => {
20972097
const point = rotatePoint(root.point(e.clientX, e.clientY), rotation*-1, centre);
20982098
const x = Math.floor((point.x - (originX - (cellsize / 2))) / cellsize);
20992099
const y = Math.floor((point.y - (originY - (cellsize / 2))) / cellsize);
21002100
if (x >= 0 - clickDeltaX && x < width + clickDeltaX && y >= 0 - clickDeltaY && y < height + clickDeltaY) {
2101-
// try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
2102-
if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
2101+
// // try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
2102+
// if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
21032103
this.options.boardClick!(y, x, "");
2104-
}
2104+
// }
21052105
}
21062106
});
21072107
if (this.options.rotate === 180) {
@@ -2110,10 +2110,10 @@ export abstract class RendererBase {
21102110
const x = width - Math.floor((point.x - (originX - (cellsize / 2))) / cellsize) - 1;
21112111
const y = height - Math.floor((point.y - (originY - (cellsize / 2))) / cellsize) - 1;
21122112
if (x >= 0 - clickDeltaX && x < width + clickDeltaX && y >= 0 - clickDeltaY && y < height + clickDeltaY) {
2113-
// try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
2114-
if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
2113+
// // try to cull double click handlers with buffer zones by making the generic handler less sensitive at the edges
2114+
// if ( (bufferwidth === 0) || ( (point.x >= originX) && (point.x <= maxX) && (point.y >= originY) && (point.y <= maxY) ) ) {
21152115
this.options.boardClick!(y, x, "");
2116-
}
2116+
// }
21172117
}
21182118
});
21192119
}

0 commit comments

Comments
 (0)