Fix an issue with layers when moving shapes. (#3380)
https://github.com/tldraw/tldraw/assets/2523721/d35b5e41-5270-4fad-8f9e-f8d7ac46558c https://github.com/tldraw/tldraw/assets/2523721/2e1d1f54-f980-437d-aa51-f598b59d56b9 ### Change Type <!-- ❗ Please select a 'Scope' label ❗️ --> - [x] `sdk` — Changes the tldraw SDK - [ ] `dotcom` — Changes the tldraw.com web app - [ ] `docs` — Changes to the documentation, examples, or templates. - [ ] `vs code` — Changes to the vscode plugin - [ ] `internal` — Does not affect user-facing stuff <!-- ❗ Please select a 'Type' label ❗️ --> - [x] `bugfix` — Bug fix - [ ] `feature` — New feature - [ ] `improvement` — Improving existing features - [ ] `chore` — Updating dependencies, other boring stuff - [ ] `galaxy brain` — Architectural changes - [ ] `tests` — Changes to any test code - [ ] `tools` — Changes to infrastructure, CI, internal scripts, debugging tools, etc. - [ ] `dunno` — I don't know
This commit is contained in:
parent
97b5e4093a
commit
d01a2223be
1 changed files with 38 additions and 36 deletions
|
@ -91,6 +91,15 @@ export function DefaultCanvas({ className }: TLCanvasComponentProps) {
|
||||||
])
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
{Background && (
|
||||||
|
<div className="tl-background__wrapper">
|
||||||
|
<Background />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="tl-culled-shapes">
|
||||||
|
<CulledShapes />
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
ref={rCanvas}
|
ref={rCanvas}
|
||||||
draggable={false}
|
draggable={false}
|
||||||
|
@ -106,15 +115,7 @@ export function DefaultCanvas({ className }: TLCanvasComponentProps) {
|
||||||
{SvgDefs && <SvgDefs />}
|
{SvgDefs && <SvgDefs />}
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
{Background && (
|
|
||||||
<div className="tl-background__wrapper">
|
|
||||||
<Background />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<GridWrapper />
|
<GridWrapper />
|
||||||
<div className="tl-culled-shapes">
|
|
||||||
<CulledShapes />
|
|
||||||
</div>
|
|
||||||
<div ref={rHtmlLayer} className="tl-html-layer tl-shapes" draggable={false}>
|
<div ref={rHtmlLayer} className="tl-html-layer tl-shapes" draggable={false}>
|
||||||
<OnTheCanvasWrapper />
|
<OnTheCanvasWrapper />
|
||||||
<SelectionBackgroundWrapper />
|
<SelectionBackgroundWrapper />
|
||||||
|
@ -137,6 +138,7 @@ export function DefaultCanvas({ className }: TLCanvasComponentProps) {
|
||||||
<InFrontOfTheCanvasWrapper />
|
<InFrontOfTheCanvasWrapper />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue