Describe what your pull request does. If appropriate, add GIFs or images showing the before and after. ### Change Type - [ ] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [x] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Run the examples 2. [http://localhost:5420/exploded](http://localhost:5420/exploded) Observe that shapes work and can be resized as expected - [ ] Unit Tests - [ ] End to end tests ### Release Notes - Fixed Sublibraries (Exploded) example Co-authored-by: Gary Saunders <gary.saunders@sportsengine.com> Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
932ec4cdd6
commit
699502d8c4
1 changed files with 15 additions and 0 deletions
|
@ -2,6 +2,11 @@ import {
|
||||||
Canvas,
|
Canvas,
|
||||||
ContextMenu,
|
ContextMenu,
|
||||||
TldrawEditor,
|
TldrawEditor,
|
||||||
|
TldrawHandles,
|
||||||
|
TldrawHoveredShapeIndicator,
|
||||||
|
TldrawScribble,
|
||||||
|
TldrawSelectionBackground,
|
||||||
|
TldrawSelectionForeground,
|
||||||
TldrawUi,
|
TldrawUi,
|
||||||
defaultShapeTools,
|
defaultShapeTools,
|
||||||
defaultShapeUtils,
|
defaultShapeUtils,
|
||||||
|
@ -9,6 +14,15 @@ import {
|
||||||
} from '@tldraw/tldraw'
|
} from '@tldraw/tldraw'
|
||||||
import '@tldraw/tldraw/tldraw.css'
|
import '@tldraw/tldraw/tldraw.css'
|
||||||
|
|
||||||
|
const defaultComponents = {
|
||||||
|
Scribble: TldrawScribble,
|
||||||
|
CollaboratorScribble: TldrawScribble,
|
||||||
|
SelectionForeground: TldrawSelectionForeground,
|
||||||
|
SelectionBackground: TldrawSelectionBackground,
|
||||||
|
Handles: TldrawHandles,
|
||||||
|
HoveredShapeIndicator: TldrawHoveredShapeIndicator,
|
||||||
|
}
|
||||||
|
|
||||||
export default function ExplodedExample() {
|
export default function ExplodedExample() {
|
||||||
return (
|
return (
|
||||||
<div className="tldraw__editor">
|
<div className="tldraw__editor">
|
||||||
|
@ -16,6 +30,7 @@ export default function ExplodedExample() {
|
||||||
initialState="select"
|
initialState="select"
|
||||||
shapeUtils={defaultShapeUtils}
|
shapeUtils={defaultShapeUtils}
|
||||||
tools={[...defaultTools, ...defaultShapeTools]}
|
tools={[...defaultTools, ...defaultShapeTools]}
|
||||||
|
components={defaultComponents}
|
||||||
persistenceKey="exploded-example"
|
persistenceKey="exploded-example"
|
||||||
>
|
>
|
||||||
<TldrawUi>
|
<TldrawUi>
|
||||||
|
|
Loading…
Reference in a new issue