mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
slightly optimize onZoom
This commit is contained in:
parent
decfbc1337
commit
aab27ca673
4 changed files with 25 additions and 12 deletions
|
|
@ -65,8 +65,8 @@ function showElementLockTip(event) {
|
|||
}
|
||||
}
|
||||
|
||||
const moved = debounce(mouseMove, 100);
|
||||
function mouseMove() {
|
||||
const onMouseMove = debounce(handleMouseMove, 100);
|
||||
function handleMouseMove() {
|
||||
const point = d3.mouse(this);
|
||||
const i = findCell(point[0], point[1]); // pack cell id
|
||||
if (i === undefined) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue