Rename shapes apis (#1787)
This PR updates APIs related to shapes in the Editor. - removes the requirement for an `id` when creating shapes - `shapesOnCurrentPage` -> `currentPageShapes` - `findAncestor` -> `findShapeAncestor` - `findCommonAncestor` -> `findCommonShapeAncestor` - Adds `getCurrentPageShapeIds` - `getAncestors` -> `getShapeAncestors` - `getClipPath` -> `getShapeClipPath` - `getGeometry` -> `getShapeGeometry` - `getHandles` -> `getShapeHandles` - `getTransform` -> `getShapeLocalTransform` - `getPageTransform` -> `getShapePageTransform` - `getOutlineSegments` -> `getShapeOutlineSegments` - `getPageBounds` -> `getShapePageBounds` - `getPageTransform` -> `getShapePageTransform` - `getParentTransform` -> `getShapeParentTransform` - `selectionBounds` -> `selectionRotatedPageBounds` ### Change Type - [x] `major` — Breaking change ### Test Plan - [x] Unit Tests
This commit is contained in:
parent
39dbbca90e
commit
bf27743595
104 changed files with 1151 additions and 1115 deletions
|
@ -60,7 +60,7 @@ const _ShapeIndicator: TLShapeIndicatorComponent = ({ id, className, color, opac
|
|||
const transform = useValue(
|
||||
'transform',
|
||||
() => {
|
||||
const pageTransform = editor.getPageTransform(id)
|
||||
const pageTransform = editor.getShapePageTransform(id)
|
||||
if (!pageTransform) return ''
|
||||
return pageTransform.toCssString()
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue