Field vdFIlterActionPoint
- Namespace
- vdWebLibrary
- Assembly
- JsPropertiesExtractor.dll
Represents a user define function of type vdFIlterActionPointDelegate will be called just before action ends.
In order to allow the user to change the default SelectedPoint.
public vdFIlterActionPointDelegate vdFIlterActionPoint
Returns
- vdFIlterActionPointDelegate
- Represents a user define function of type will be called just before action ends. In order to allow the user to change the default SelectedPoint.
Examples
Suppose that we want to get the projection of selected osnap over the Ortho Line, instead of getting the Osnap point.
//When Action with ReferencePoint is active and the Action OrthoMode is on and Osnap is selected then change the final point to be the projection of Osnap to the Line between ReferencePoint and OrthoPoint
vdcanvas.vdFIlterActionPoint = function (args) {
if (args.Action.ReferencePoint && args.Action.OrthoPoint && args.Action.OsnapPoint) {
//transform the osnap from view to world cs
var osnapworld = args.Action.vdrawOwner().ViewToWorld(args.Action.OsnapPoint);
//get the perpendicular from osnap point to the line between ReferencePoint and OrthoPoint
args.SelectedPoint = vdgeo.projectionPointOnLine(osnapworld, args.Action.ReferencePoint, args.Action.OrthoPoint);
}
}