feat(core): replace fitView option offset with expressive padding (#1967)
* feat(core): replace fitView option `offset` with expressive `padding` Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add * chore: cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -160,7 +160,6 @@ export function useViewportHelper(state: State) {
|
||||
options.minZoom ?? state.minZoom,
|
||||
options.maxZoom ?? state.maxZoom,
|
||||
options.padding ?? DEFAULT_PADDING,
|
||||
options.offset,
|
||||
)
|
||||
|
||||
return transformViewport(x, y, zoom, options)
|
||||
@@ -179,7 +178,7 @@ export function useViewportHelper(state: State) {
|
||||
state.dimensions.height,
|
||||
state.minZoom,
|
||||
state.maxZoom,
|
||||
options.padding,
|
||||
options.padding ?? DEFAULT_PADDING,
|
||||
)
|
||||
|
||||
return transformViewport(x, y, zoom, options)
|
||||
|
||||
Reference in New Issue
Block a user