Reputation: 49
In my product, I do not want selections to be reset under certain conditions.
But selections must be able to add.
So, I want to cancel selection change with "before selection change event".
please help.
Upvotes: 0
Views: 225
Reputation: 9942
Unfortunately I'm not aware of any way the viewer would allow you to do this officially. What can be configured is - you can lock certain dbIDs to make them unselectable - but I'm guessing that wouldn't really help in your particular case.
With that said, you could possibly modify the selection behavior by modifying the viewer.impl.selector
object which basically encapsulates all the selection logic (look for the Selector
class in https://developer.api.autodesk.com/modelderivative/v2/viewers/7.*/viewer3D.js). But that would be a brittle hack, as anything under viewer.impl
is considered internal implementation and as such shouldn't be relied upon.
Upvotes: 1