mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-22 00:37:05 +08:00
@@ -56,11 +56,14 @@ export class PanTool extends BaseTool<PanToolOption> {
|
||||
const selection = this.gfx.selection.surfaceSelections;
|
||||
const currentTool = this.controller.currentToolOption$.peek();
|
||||
const restoreToPrevious = () => {
|
||||
this.controller.setTool(currentTool);
|
||||
this.gfx.selection.set(selection);
|
||||
const { toolType, options } = currentTool;
|
||||
if (toolType && options) {
|
||||
this.controller.setTool(toolType, options);
|
||||
this.gfx.selection.set(selection);
|
||||
}
|
||||
};
|
||||
|
||||
this.controller.setTool('pan', {
|
||||
this.controller.setTool(PanTool, {
|
||||
panning: true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user