mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 16:19:43 +08:00
fix edgeless edit bar tooltip (#243)
* fix edgeless edit bar tooltip * fix tooltip
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// import { Draw } from '@toeverything/components/board-shapes';
|
||||
|
||||
import { BaseTool } from '@toeverything/components/board-state';
|
||||
import { TDShapeType } from '@toeverything/components/board-types';
|
||||
|
||||
enum Status {
|
||||
Idle = 'idle',
|
||||
Pointing = 'pointing',
|
||||
Draw = 'draw',
|
||||
}
|
||||
|
||||
export class HandDragTool extends BaseTool {
|
||||
override type = TDShapeType.HandDrag as const;
|
||||
|
||||
override status: Status = Status.Idle;
|
||||
|
||||
/* ----------------- Event Handlers ----------------- */
|
||||
|
||||
override onEnter = () => {
|
||||
this.app.patchState({
|
||||
settings: {
|
||||
forcePanning: true,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
override onExit = () => {
|
||||
this.app.patchState({
|
||||
settings: {
|
||||
forcePanning: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './hand-drag-tool';
|
||||
Reference in New Issue
Block a user