Skip to content

Commit 64f31d7

Browse files
committed
Refactor: minor fn name change
1 parent 86f2d88 commit 64f31d7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

esbuild.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const cleaner = {
99
setup(build) {
1010
build.onLoad({ filter: /store\/index.ts*/ }, async (args) => {
1111
const source = await readFile(args.path, "utf8");
12-
console.log(args.path);
1312
return {
1413
contents: source.replaceAll(`(await import("@dreamworld/addon-redux")).enhancer`, "null"),
1514
loader: "ts"

src/components/workspace/zoom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const panDown = () => {
3838
d3Extended.selectById(ids.workspace).transition().call(zoom.translateBy, 0, -50);
3939
};
4040

41-
export const zoomAndPan = ({ k, x, y }) => {
41+
export const panAndZoom = ({ k, x, y }) => {
4242
d3Extended
4343
.selectById(ids.workspace)
4444
.transition()

src/hooks/events/workspace-load.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useLayoutEffect } from "react";
2-
import { zoomAndPan } from "@/components/workspace/zoom";
2+
import { panAndZoom } from "@/components/workspace/zoom";
33
import { ids, selectors } from "@/constants";
44
import { store } from "@/store";
55
import { initializeElements, sync } from "@/store/reducers/editor";
@@ -21,7 +21,7 @@ const useWorkspaceLoad = (props: ISTKProps) => {
2121
width: workspaceGroupWidth
2222
} = d3Extended.selectionBounds(d3Extended.select(selectors.workspaceGroup));
2323
const scaleFactor = 1.05;
24-
zoomAndPan({
24+
panAndZoom({
2525
k: scaleFactor,
2626
y: (workspaceheight - (wgOffsetTop * scaleFactor * 2 + workspaceGroupHeight * scaleFactor)) / 2 - 5,
2727
x: (workspaceWidth - (wgOffsetLeft * scaleFactor * 2 + workspaceGroupWidth * scaleFactor)) / 2

0 commit comments

Comments
 (0)