fix: use global nodeExtent if node.extent is undefined

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent 39c8f60818
commit 8e6e85a007
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -54,15 +54,16 @@ const defaultState = (): State => ({
d3ZoomHandler: null,
minZoom: 0.5,
maxZoom: 2,
translateExtent: [
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
],
nodeExtent: [
[Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],
[Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],
],
preventScrolling: true,
zoomOnScroll: true,
zoomOnPinch: true,