Skip to content

Commit

Permalink
fix touching
Browse files Browse the repository at this point in the history
  • Loading branch information
jwklong authored Jan 11, 2025
1 parent 67390c1 commit 5b0beb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/extensions/jwTargets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class Extension {

let targets = vm.runtime.targets
targets.filter(v => v !== TARGET && !v.isStage)
targets.filter(v => TARGET.target.isTouchingTarget(v))
targets.filter(v => TARGET.target.isTouchingTarget(v.id))
return new jwArray.Type(targets.map(v => new Target.Type(v.id)))
}

Expand Down
2 changes: 1 addition & 1 deletion src/sprites/rendered-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ class RenderedTarget extends Target {
*/
isTouchingTarget (targetId) {
targetId = Cast.toString(targetId);
const target = this.runtime.getSpriteTargetByName(targetId);
const target = this.runtime.getTargetById(targetId);
if (!target || !this.renderer || target.dragging) {
return false;
}
Expand Down

0 comments on commit 5b0beb2

Please sign in to comment.