Skip to content

Clipper onAfterDelete fires onBeforeDelete #799

Description

@ShaMan123

Describe the bug 📝

Clipper onAfterDelete fires onBeforeDelete - expected state is wrong at the time of the call. onAfterDelete is expected to have the list already updated, the entry removed, size being up to date. Currently it is not, the removed entry is still there.

this.list.onBeforeDelete.add(({ value: plane }) => {
if (!plane.world.renderer) {
throw new Error("Renderer not found for this plane's world!");
}
plane.world.renderer.setPlane(false, plane.three);
plane.dispose();
this.updateMaterialsAndPlanes();
this.onAfterDelete.trigger(plane);
});

Reproduction ▶️

No response

Steps to reproduce 🔢

No response

System Info 💻

n/a

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • Check that this is a concrete bug. For Q&A join our Community.
  • The provided reproduction is a minimal reproducible example of the bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions