File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ const cleaner = {
99 setup ( build ) {
1010 build . onLoad ( { filter : / s t o r e \/ i n d e x .t s * / } , 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"
Original file line number Diff line number Diff 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 ( )
Original file line number Diff line number Diff line change 11import { useLayoutEffect } from "react" ;
2- import { zoomAndPan } from "@/components/workspace/zoom" ;
2+ import { panAndZoom } from "@/components/workspace/zoom" ;
33import { ids , selectors } from "@/constants" ;
44import { store } from "@/store" ;
55import { 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
You can’t perform that action at this time.
0 commit comments