refactor(positions): remove unused node origins

This commit is contained in:
moklick
2024-06-27 15:03:35 +02:00
parent 1a51428bd4
commit 609f7ed792
12 changed files with 64 additions and 69 deletions
+16 -15
View File
@@ -45,22 +45,23 @@ const useViewportHelper = (): ViewportHelperFunctions => {
return { x, y, zoom };
},
fitView: (options) => {
const { nodeLookup, width, height, nodeOrigin, minZoom, maxZoom, panZoom } = store.getState();
const { nodeLookup, width, height, minZoom, maxZoom, panZoom } = store.getState();
return panZoom
? fitView(
{
nodeLookup,
width,
height,
nodeOrigin,
minZoom,
maxZoom,
panZoom,
},
options
)
: false;
if (!panZoom) {
return false;
}
return fitView(
{
nodeLookup,
width,
height,
minZoom,
maxZoom,
panZoom,
},
options
);
},
setCenter: (x, y, options) => {
const { width, height, maxZoom, panZoom } = store.getState();