70002701 Support Object Snap Tracking in web control

Article 70002701
Type Wish
Product WebJS
Version 1103
Date Added 5/28/2025 12:00:00 AM
Fixed 11.4.3 (5/29/2025 12:00:00 AM)
Submitted by Brendan Fry

Summary

Support Object Snap Tracking in web control

Solution

In version 11.4.3 new properties were added
1.PolarTrack , PolarTrackAngle, PolarTrackActionFlag of vdcanvas object
When PolarTrack is true then while waiting a user reference point the cursor movement is locked on specific angles multiples to the PolarTrackAngle property .
If PolarTrackActionFlag is true then the angle count begins from the last action line segment's angle.
Default values
PolarTrack = true;
PolarTrackAngle = vdgeo.HALF_PI (45 degrees)
PolarTrackActionFlag = 1;



2.OsnapTrack of vdcanvas object
When OsnapTrack is true and the osnapMode contains one or more of the following osnaps vdConst.OsnapMode_END , vdConst.OsnapMode_MID , vdConst.OsnapMode_INS , vdConst.OsnapMode_NODE , vdConst.OsnapMode_QUA
and a user waiting point action is active,
Then when the cursor is over the osnap it is added to a temporary osnap track llist and the osnap is marked by a cross.
When a cursor is moved check its position angle relative to osnap marked positsion and if it is multiples to the PolarTrackAngle property the cursor is locked to that angle and an infinitive dotted line is displayed
Note if the user moves the cursor over a marked osnap again then the osnap is un-marked and removed from the temporary track list
3.OsnapMode vdConst.OsnapMode_EXTENSION
When the vdConst.OsnapMode_EXTENSION is selected and the user moves over a line or an arc segment, an osnap with a cross symbol is display in the mid of the segment.
If the user pass over that symbol the segment is added to a temporary extension list
When the user move the cursor, a checking is done to find the nearest depend on PickSize , extension of the segments in the temporay extensions list.If one is found the cursor is locked to the segment extension and dotted segment is drawn
Note if an intersection between two segments exists in the PickSize cursor area then the intersection is locked.
Also if the user moves the cursor over a cross marked extension osnap again then the extension osnap is un-marked and removed from the temporary extension list



You can control tracking tooltips by the vdcanvas.Tooltip properties

Send comments on this topic.