kopia lustrzana https://github.com/Tldraw/Tldraw
Update PointingShape.ts
rodzic
c28f11e4ba
commit
a0ca46f98c
|
@ -5,6 +5,7 @@ import {
|
|||
TLArrowShape,
|
||||
TLEventHandlers,
|
||||
TLGeoShape,
|
||||
TLNoteShape,
|
||||
TLPointerEventInfo,
|
||||
TLShape,
|
||||
} from '@tldraw/editor'
|
||||
|
@ -28,6 +29,13 @@ export class PointingShape extends StateNode {
|
|||
this.hitShape = info.shape
|
||||
const outermostSelectingShape = this.editor.getOutermostSelectableShape(info.shape)
|
||||
|
||||
// Bring sticky notes to front on pointer down;
|
||||
// consider changing the logic to "move to front of any overlapping shapes"
|
||||
// rather than move to front of all shapes in the page / parent
|
||||
if (this.editor.isShapeOfType<TLNoteShape>(info.shape, 'note')) {
|
||||
this.editor.bringToFront([info.shape.id])
|
||||
}
|
||||
|
||||
if (
|
||||
// If the shape has an onClick handler
|
||||
this.editor.getShapeUtil(info.shape).onClick ||
|
||||
|
|
Ładowanie…
Reference in New Issue