Skip to content

Commit

Permalink
fixed click and dragObjectIn events in external component
Browse files Browse the repository at this point in the history
  • Loading branch information
ishubin committed Dec 1, 2024
1 parent 45a4c55 commit 04c21bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/components/editor/states/interact/DragItemState.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class DragItemState extends SubState {

emit(item, eventName, ...args) {
if (this.componentItem) {
this.componentItem.meta.componentUserEventBus.emitItemEvent(this.item.id, eventName, ...args);
this.componentItem.meta.componentUserEventBus.emitItemEvent(item.id, eventName, ...args);
} else {
this.userEventBus.emitItemEvent(item.id, eventName, ...args);
}
Expand Down Expand Up @@ -281,7 +281,7 @@ export class DragItemState extends SubState {
this.looper.stop();
this.emit(this.item, Events.standardEvents.dragEnd.id);
if (!this.moved) {
this.parentState.handleItemClick(this.item, mx, my);
this.parentState.handleItemClick(this.item, mx, my, componentItem);
this.migrateToPreviousSubState();
return;
}
Expand Down

0 comments on commit 04c21bf

Please sign in to comment.