fix edgeless edit bar tooltip (#243)
* fix edgeless edit bar tooltip * fix tooltip
This commit is contained in:
@@ -52,8 +52,8 @@ const tools: Array<{
|
|||||||
{ type: 'frame', label: 'Frame', tooltip: 'Frame', icon: FrameIcon },
|
{ type: 'frame', label: 'Frame', tooltip: 'Frame', icon: FrameIcon },
|
||||||
{
|
{
|
||||||
type: TDShapeType.Editor,
|
type: TDShapeType.Editor,
|
||||||
label: 'Text',
|
label: 'Text Block',
|
||||||
tooltip: 'Text',
|
tooltip: 'Text Block',
|
||||||
icon: TextIcon,
|
icon: TextIcon,
|
||||||
},
|
},
|
||||||
{ type: 'shapes', component: ShapeTools },
|
{ type: 'shapes', component: ShapeTools },
|
||||||
@@ -61,9 +61,9 @@ const tools: Array<{
|
|||||||
{ type: 'Connector', component: LineTools },
|
{ type: 'Connector', component: LineTools },
|
||||||
// { type: 'erase', label: 'Erase', tooltip: 'Erase', icon: EraseIcon },
|
// { type: 'erase', label: 'Erase', tooltip: 'Erase', icon: EraseIcon },
|
||||||
{
|
{
|
||||||
type: TDShapeType.HandDraw,
|
type: TDShapeType.HandDrag,
|
||||||
label: 'HandDraw',
|
label: 'Hand Drag',
|
||||||
tooltip: 'HandDraw',
|
tooltip: 'Hand Drag',
|
||||||
icon: HandToolIcon,
|
icon: HandToolIcon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3981,7 +3981,7 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
|||||||
this.patchState({
|
this.patchState({
|
||||||
settings: {
|
settings: {
|
||||||
forcePanning:
|
forcePanning:
|
||||||
this.currentTool.type === TDShapeType.HandDraw,
|
this.currentTool.type === TDShapeType.HandDrag,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.spaceKey = false;
|
this.spaceKey = false;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ enum Status {
|
|||||||
Draw = 'draw',
|
Draw = 'draw',
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HandDrawTool extends BaseTool {
|
export class HandDragTool extends BaseTool {
|
||||||
override type = TDShapeType.HandDraw as const;
|
override type = TDShapeType.HandDrag as const;
|
||||||
|
|
||||||
override status: Status = Status.Idle;
|
override status: Status = Status.Idle;
|
||||||
|
|
||||||
1
libs/components/board-tools/src/hand-drag/index.ts
Normal file
1
libs/components/board-tools/src/hand-drag/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './hand-drag-tool';
|
||||||
@@ -1 +0,0 @@
|
|||||||
export * from './hand-draw-tool';
|
|
||||||
@@ -5,7 +5,7 @@ import { EditorTool } from './editor-tool';
|
|||||||
import { EllipseTool } from './ellipse-tool';
|
import { EllipseTool } from './ellipse-tool';
|
||||||
import { EraseTool } from './erase-tool';
|
import { EraseTool } from './erase-tool';
|
||||||
import { FrameTool } from './frame-tool/frame-tool';
|
import { FrameTool } from './frame-tool/frame-tool';
|
||||||
import { HandDrawTool } from './hand-draw';
|
import { HandDragTool } from './hand-drag';
|
||||||
import { HexagonTool } from './hexagon-tool';
|
import { HexagonTool } from './hexagon-tool';
|
||||||
import { HighlightTool } from './highlight-tool';
|
import { HighlightTool } from './highlight-tool';
|
||||||
import { LaserTool } from './laser-tool';
|
import { LaserTool } from './laser-tool';
|
||||||
@@ -32,7 +32,7 @@ export interface ToolsMap {
|
|||||||
[TDShapeType.Highlight]: typeof HighlightTool;
|
[TDShapeType.Highlight]: typeof HighlightTool;
|
||||||
[TDShapeType.Editor]: typeof EditorTool;
|
[TDShapeType.Editor]: typeof EditorTool;
|
||||||
[TDShapeType.WhiteArrow]: typeof WhiteArrowTool;
|
[TDShapeType.WhiteArrow]: typeof WhiteArrowTool;
|
||||||
[TDShapeType.HandDraw]: typeof HandDrawTool;
|
[TDShapeType.HandDrag]: typeof HandDragTool;
|
||||||
[TDShapeType.Laser]: typeof LaserTool;
|
[TDShapeType.Laser]: typeof LaserTool;
|
||||||
[TDShapeType.Frame]: typeof FrameTool;
|
[TDShapeType.Frame]: typeof FrameTool;
|
||||||
}
|
}
|
||||||
@@ -59,6 +59,6 @@ export const tools: { [K in TDToolType]: ToolsMap[K] } = {
|
|||||||
[TDShapeType.Hexagon]: HexagonTool,
|
[TDShapeType.Hexagon]: HexagonTool,
|
||||||
[TDShapeType.WhiteArrow]: WhiteArrowTool,
|
[TDShapeType.WhiteArrow]: WhiteArrowTool,
|
||||||
[TDShapeType.Laser]: LaserTool,
|
[TDShapeType.Laser]: LaserTool,
|
||||||
[TDShapeType.HandDraw]: HandDrawTool,
|
[TDShapeType.HandDrag]: HandDragTool,
|
||||||
[TDShapeType.Frame]: FrameTool,
|
[TDShapeType.Frame]: FrameTool,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ export type TDToolType =
|
|||||||
| TDShapeType.WhiteArrow
|
| TDShapeType.WhiteArrow
|
||||||
| TDShapeType.Editor
|
| TDShapeType.Editor
|
||||||
| TDShapeType.Frame
|
| TDShapeType.Frame
|
||||||
| TDShapeType.HandDraw;
|
| TDShapeType.HandDrag;
|
||||||
|
|
||||||
export type Easing =
|
export type Easing =
|
||||||
| 'linear'
|
| 'linear'
|
||||||
@@ -287,7 +287,7 @@ export enum TDShapeType {
|
|||||||
Video = 'video',
|
Video = 'video',
|
||||||
Editor = 'editor',
|
Editor = 'editor',
|
||||||
WhiteArrow = 'white-arrow',
|
WhiteArrow = 'white-arrow',
|
||||||
HandDraw = 'hand-draw',
|
HandDrag = 'hand-drag',
|
||||||
Frame = 'frame',
|
Frame = 'frame',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user