70001344 How to filter grip entity

Article 70001344
Type HowTo
Product WebJS
Date Added 6/6/2018 12:00:00 AM
Fixed 7.7015.0.6 (6/6/2018 12:00:00 AM)
Submitted by Kostas Androulakis

Summary

How to filter which entities are allowed to use grips.

Solution

We can use the filtergripentity event of GripManager.
We have to set in the vdraw initialize page load the event like: vdcanvas.GripManager.filtergripentity = _filtergripentity;
So every time that we are going to click on an entity in order to use the grips _filtergripentity method will be called.

   function _filtergripentity(e) {     
            if (e.entity._t === vdPolyline_code) {
                   e.cancel = true;    // in this case we do not allow to move grip of vdPolylines   
            }
    }

Send comments on this topic.