fix edgeless edit bar tooltip (#243)

* fix edgeless edit bar tooltip

* fix tooltip
This commit is contained in:
Horus
2022-08-16 14:31:50 +08:00
committed by GitHub
parent bdc61ed02e
commit bd59871c22
7 changed files with 14 additions and 14 deletions
@@ -52,8 +52,8 @@ const tools: Array<{
{ type: 'frame', label: 'Frame', tooltip: 'Frame', icon: FrameIcon },
{
type: TDShapeType.Editor,
label: 'Text',
tooltip: 'Text',
label: 'Text Block',
tooltip: 'Text Block',
icon: TextIcon,
},
{ type: 'shapes', component: ShapeTools },
@@ -61,9 +61,9 @@ const tools: Array<{
{ type: 'Connector', component: LineTools },
// { type: 'erase', label: 'Erase', tooltip: 'Erase', icon: EraseIcon },
{
type: TDShapeType.HandDraw,
label: 'HandDraw',
tooltip: 'HandDraw',
type: TDShapeType.HandDrag,
label: 'Hand Drag',
tooltip: 'Hand Drag',
icon: HandToolIcon,
},
{
@@ -3981,7 +3981,7 @@ export class TldrawApp extends StateManager<TDSnapshot> {
this.patchState({
settings: {
forcePanning:
this.currentTool.type === TDShapeType.HandDraw,
this.currentTool.type === TDShapeType.HandDrag,
},
});
this.spaceKey = false;
@@ -9,8 +9,8 @@ enum Status {
Draw = 'draw',
}
export class HandDrawTool extends BaseTool {
override type = TDShapeType.HandDraw as const;
export class HandDragTool extends BaseTool {
override type = TDShapeType.HandDrag as const;
override status: Status = Status.Idle;
@@ -0,0 +1 @@
export * from './hand-drag-tool';
@@ -1 +0,0 @@
export * from './hand-draw-tool';
+3 -3
View File
@@ -5,7 +5,7 @@ import { EditorTool } from './editor-tool';
import { EllipseTool } from './ellipse-tool';
import { EraseTool } from './erase-tool';
import { FrameTool } from './frame-tool/frame-tool';
import { HandDrawTool } from './hand-draw';
import { HandDragTool } from './hand-drag';
import { HexagonTool } from './hexagon-tool';
import { HighlightTool } from './highlight-tool';
import { LaserTool } from './laser-tool';
@@ -32,7 +32,7 @@ export interface ToolsMap {
[TDShapeType.Highlight]: typeof HighlightTool;
[TDShapeType.Editor]: typeof EditorTool;
[TDShapeType.WhiteArrow]: typeof WhiteArrowTool;
[TDShapeType.HandDraw]: typeof HandDrawTool;
[TDShapeType.HandDrag]: typeof HandDragTool;
[TDShapeType.Laser]: typeof LaserTool;
[TDShapeType.Frame]: typeof FrameTool;
}
@@ -59,6 +59,6 @@ export const tools: { [K in TDToolType]: ToolsMap[K] } = {
[TDShapeType.Hexagon]: HexagonTool,
[TDShapeType.WhiteArrow]: WhiteArrowTool,
[TDShapeType.Laser]: LaserTool,
[TDShapeType.HandDraw]: HandDrawTool,
[TDShapeType.HandDrag]: HandDragTool,
[TDShapeType.Frame]: FrameTool,
};
+2 -2
View File
@@ -212,7 +212,7 @@ export type TDToolType =
| TDShapeType.WhiteArrow
| TDShapeType.Editor
| TDShapeType.Frame
| TDShapeType.HandDraw;
| TDShapeType.HandDrag;
export type Easing =
| 'linear'
@@ -287,7 +287,7 @@ export enum TDShapeType {
Video = 'video',
Editor = 'editor',
WhiteArrow = 'white-arrow',
HandDraw = 'hand-draw',
HandDrag = 'hand-drag',
Frame = 'frame',
}