Skip to content

Commit

Permalink
style: moveExcludeDrag -> onMoveExcludeDrag
Browse files Browse the repository at this point in the history
  • Loading branch information
F-star committed Mar 1, 2024
1 parent 7be38bd commit 49db653
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_drag_canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class DragCanvasTool implements ITool {
this.editor.canvasDragger.inactive();
this.editor.canvasDragger.enableDragBySpace();
}
moveExcludeDrag() {
onMoveExcludeDrag() {
// noop
}
onStart() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_draw_graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export abstract class DrawGraphTool implements ITool {
onInactive() {
this.unbindEvent();
}
moveExcludeDrag() {
onMoveExcludeDrag() {
// do nothing;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_draw_path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class DrawPathTool implements ITool {
this.editor.render();
}

moveExcludeDrag(e: PointerEvent, isOutsideCanvas: boolean) {
onMoveExcludeDrag(e: PointerEvent, isOutsideCanvas: boolean) {
if (isOutsideCanvas) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_draw_text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class DrawTextTool implements ITool {
onInactive() {
// noop
}
moveExcludeDrag() {
onMoveExcludeDrag() {
// do nothing
}
onStart() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class ToolManager {
}
} else {
const isOutsideCanvas = this.editor.canvasElement !== e.target;
this.currentTool.moveExcludeDrag(e, isOutsideCanvas);
this.currentTool.onMoveExcludeDrag(e, isOutsideCanvas);
}
};
const handleUp = (e: PointerEvent) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class PathSelectTool implements ITool {
this.editor.commandManager.batchCommandEnd();
}

moveExcludeDrag() {
onMoveExcludeDrag() {
// noop
}
afterEnd() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/tool_select/tool_select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class SelectTool implements ITool {
this.editor.sceneGraph.render();
}

moveExcludeDrag(e: PointerEvent, isOutsideCanvas: boolean) {
onMoveExcludeDrag(e: PointerEvent, isOutsideCanvas: boolean) {
if (isOutsideCanvas) return;

const point = this.editor.getSceneCursorXY(e);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/tools/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface ITool extends IBaseTool {
hotkey: string;
type: string;
cursor: ICursor;
moveExcludeDrag: (event: PointerEvent, isOutsideCanvas: boolean) => void;
onMoveExcludeDrag: (event: PointerEvent, isOutsideCanvas: boolean) => void;
}

export interface IBaseTool {
Expand Down

0 comments on commit 49db653

Please sign in to comment.