mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): continue migration
This commit is contained in:
parent
eaa0046e67
commit
4a04a8622d
23 changed files with 121 additions and 77 deletions
|
|
@ -12,13 +12,14 @@ import {
|
|||
findCell
|
||||
} from "./utils/graphUtils";
|
||||
import {createTypedArray} from "./utils/arrayUtils";
|
||||
import {drawRivers, drawStates, drawBorders} from "../modules/ui/layers";
|
||||
import {applyPreset, drawRivers, drawStates, drawBorders} from "../modules/ui/layers";
|
||||
import {invokeActiveZooming} from "../modules/activeZooming";
|
||||
import {applyStoredOptions, applyMapSize, randomizeOptions} from "../modules/ui/options";
|
||||
import {locked} from "./scripts/options/lock";
|
||||
import {Rulers, Ruler, drawScaleBar} from "./modules/measurers";
|
||||
import {byId} from "./utils/shorthands";
|
||||
import {addGlobalListeners} from "./scripts/listeners";
|
||||
import {restoreDefaultEvents} from "./scripts/events";
|
||||
|
||||
addGlobalListeners();
|
||||
|
||||
|
|
|
|||
5
src/scripts/events.ts
Normal file
5
src/scripts/events.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export function restoreDefaultEvents() {
|
||||
Zoom.setZoomBehavior();
|
||||
viewbox.style("cursor", "default").on(".drag", null).on("click", clicked).on("touchmove mousemove", onMouseMove);
|
||||
legend.call(d3.drag().on("start", dragLegendBox));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue