Fix bug on sticky
This commit is contained in:
parent
19aa5dc789
commit
61f7fa11ab
2 changed files with 7 additions and 2 deletions
|
@ -288,7 +288,9 @@ export class TranslateSession implements Session {
|
|||
|
||||
afterShapes[shape.id] = {
|
||||
...afterShapes[shape.id],
|
||||
point: TLDR.getShape(data, shape.id, pageId).point,
|
||||
...(this.isCreate
|
||||
? TLDR.getShape(data, shape.id, pageId)
|
||||
: { point: TLDR.getShape(data, shape.id, pageId).point }),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -326,6 +328,8 @@ export class TranslateSession implements Session {
|
|||
}
|
||||
})
|
||||
|
||||
console.log(afterShapes)
|
||||
|
||||
return {
|
||||
id: 'translate',
|
||||
before: {
|
||||
|
|
|
@ -58,8 +58,9 @@ export class StickyTool extends BaseTool {
|
|||
|
||||
onPointerUp: TLPointerEventHandler = () => {
|
||||
if (this.status === Status.Creating) {
|
||||
this.state.completeSession()
|
||||
this.setStatus(Status.Idle)
|
||||
this.state.completeSession()
|
||||
this.state.selectTool('select')
|
||||
this.state.setEditingId(this.shapeId)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue