Skip to content

Commit

Permalink
Merge pull request #158 from sasza2/feat/api-go-back-to-boundary
Browse files Browse the repository at this point in the history
feat: api method goBackToBoundary
  • Loading branch information
sasza2 authored May 21, 2024
2 parents 2d20e20 + 50b9f78 commit a45521d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-experts-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sasza/react-panzoom": minor
---

api new method - goBackToBoundary() - move component to containers boundary (for e.g. when container size has changed)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"react": ">=16.14.0"
},
"dependencies": {
"panzoom-core": "1.7.0"
"panzoom-core": "1.8.0"
}
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type API = {
getElements: () => Elements['current'];
getElementsInMove: () => ElementsInMove,
grabElement: (id: ElementId, position?: Position) => null | (() => void);
goBackToBoundary: () => void,
updateElementPosition: (id: ElementId, position: Position) => void;
updateElementPositionSilent: (id: ElementId, position: Position) => void;
getPosition: () => Position;
Expand Down

0 comments on commit a45521d

Please sign in to comment.