fix: persist rotating state

This commit is contained in:
Peng Xiao
2022-08-26 21:59:07 +08:00
parent cac62ed295
commit 3eb4d38034

View File

@@ -25,6 +25,8 @@ export class PointingRotateHandleState<
private handle = '' as TLSelectionHandle
onEnter = (info: TLEventSelectionInfo) => {
// Pause the history when we enter
this.app.history.pause()
this.handle = info.handle
this.updateCursor()
}
@@ -41,6 +43,8 @@ export class PointingRotateHandleState<
}
onPointerUp: TLEvents<S>['pointer'] = () => {
this.app.history.resume()
this.app.persist()
this.tool.transition('idle')
}