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:
Braks
2025-10-02 09:12:54 +02:00
parent cc0054095e
commit cca5ab8c44
4 changed files with 169 additions and 18 deletions
@@ -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)