refactor(es modules): continue migration

This commit is contained in:
Azgaar 2022-06-25 20:24:43 +03:00
parent eaa0046e67
commit 4a04a8622d
23 changed files with 121 additions and 77 deletions

View file

@ -1,13 +1,7 @@
import {restoreDefaultEvents} from "/src/scripts/events";
import {findCell} from "/src/utils/graphUtils";
import {byId} from "/src/utils/shorthands";
// restore default viewbox events
function restoreDefaultEvents() {
svg.call(zoom);
viewbox.style("cursor", "default").on(".drag", null).on("click", clicked).on("touchmove mousemove", onMouseMove);
legend.call(d3.drag().on("start", dragLegendBox));
}
// on viewbox click event - run function based on target
function clicked() {
const el = d3.event.target;