Skip to content

Commit

Permalink
code clear
Browse files Browse the repository at this point in the history
  • Loading branch information
meshosk committed Apr 14, 2024
1 parent da49210 commit a8ae0c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/parts/common/Draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class Draggable extends Movable {
private _onDropAction: (droppedItem: Draggable) => void = (droppedItem :Draggable) => {}
private _onDraggingOverAction: (droppedItem: Draggable, droppedOVer: Draggable) => void = (droppedItem :Draggable, droppedOVer: Draggable) => {}
private _onDraggingOverEndAction: () => void = () => {}
private _onDraggingStartAction: () => void = () => {}
private _onDraggingStartAction: (item: Draggable) => void = () => {}
private _onDraggingEndAction: () => void = () => {}

private readonly _connectPoint: ConnectPoint;
Expand Down Expand Up @@ -60,11 +60,11 @@ export class Draggable extends Movable {
this._onDraggingOverAction = value;
}

get onDraggingStartAction(): () => void {
get onDraggingStartAction(): (item: Draggable) => void {
return this._onDraggingStartAction;
}

set onDraggingStartAction(value: (item :Draggable) => void) {
set onDraggingStartAction(value: (item: Draggable) => void) {
this._onDraggingStartAction = value;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/services/MouseServise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class MouseService extends BaseService<MouseService>() {
// check if item is draggable
if (this.movingItem != null && this.movingItem instanceof Draggable && this.movingItem.canStartDrag === true) {
// if it is draggable and it is only one start dragging
this.movingItem.onDraggingStartAction();
this.movingItem.onDraggingStartAction(this.movingItem);
}
}
}
Expand Down

0 comments on commit a8ae0c0

Please sign in to comment.