Fix bug on sticky

This commit is contained in:
Steve Ruiz 2021-10-16 21:06:29 +01:00
parent 19aa5dc789
commit 61f7fa11ab
2 changed files with 7 additions and 2 deletions

View file

@ -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: {

View file

@ -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)
}
}