MattB Posted September 6, 2018 Share Posted September 6, 2018 I'm trying to make it so the user can create multiple measurements and then delete them individually. In the playground below, if you click in two different spots on the meshes it will create a measurement. If you click the measurement it will expand it, and if you click the X it will delete it. However, if there are two or more measurements it will only delete the last one - what am I missing? https://playground.babylonjs.com/#JIHTLS Thanks Quote Link to comment Share on other sites More sharing options...
Gijs Posted September 6, 2018 Share Posted September 6, 2018 The variable measurement1 gets overwritten with each new measurement, so you have to make a local variable for the event listeners: https://playground.babylonjs.com/#JIHTLS#1 Arte and babbleon 2 Quote Link to comment Share on other sites More sharing options...
MattB Posted September 6, 2018 Author Share Posted September 6, 2018 thank you so much! Gijs 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 7, 2018 Share Posted September 7, 2018 Flagging as solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.