mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): migrate numberUtils
This commit is contained in:
parent
b425a9daf6
commit
ad252b54e6
63 changed files with 97 additions and 56 deletions
|
|
@ -1,4 +1,6 @@
|
|||
window.handleZoom = function (isScaleChanged, isPositionChanged) {
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
|
||||
export function handleZoom(isScaleChanged, isPositionChanged) {
|
||||
viewbox.attr("transform", `translate(${viewX} ${viewY}) scale(${scale})`);
|
||||
|
||||
if (isPositionChanged) drawCoordinates();
|
||||
|
|
@ -21,7 +23,7 @@ window.handleZoom = function (isScaleChanged, isPositionChanged) {
|
|||
ctx.setTransform(scale, 0, 0, scale, viewX, viewY);
|
||||
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// active zooming feature
|
||||
export function invokeActiveZooming() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue