2014-08-13 01:47 AM
! Length of line hotspot2 0, 0, UnID, arrowDistance, 1 + 128 :UnID = UnID + 1 hotspot2 arrowDistance * cos(arrowAngle), arrowDistance * sin(arrowAngle), UnID, arrowDistance, 2 :UnID = UnID + 1 hotspot2 -1, 0, UnID, arrowDistance, 3 :UnID = UnID + 1 ! Angle of line hotspot2 arrowDistance, 0, UnID, arrowAngle, 4 + 128 :UnID = UnID + 1 hotspot2 arrowDistance * cos(arrowAngle), arrowDistance * sin(arrowAngle), UnID, arrowAngle, 5 :UnID = UnID + 1 hotspot2 0, 0, UnID, arrowAngle, 6 :UnID = UnID + 1This is basically the way a standard label behaves and I would like to mimic its behaviour as closely as possible for a more intuitive user experience. I can revert back to using pure X and Y coordinates for the label head and elbow but I would rather this way if it's possible.
2014-08-13 12:01 PM
2014-08-14 12:12 AM
2014-08-14 03:51 AM
mcjh_matt wrote:I don't think you can link angle and length type hotspots.
What I am trying to achieve is movement that uses an angle and a line length like the built-in label tool.
2014-08-14 04:03 AM
Barry wrote:I had a feeling that was going to be the answer Barry.
I don't think you can link angle and length type hotspots.
2014-08-14 04:28 AM
2014-08-14 09:24 AM
2014-08-15 12:10 AM
! Sticky hotspots, only check when editing stickyTol = 0.05 if GLOB_CONTEXT >= 22 and GLOB_CONTEXT <= 28 then for i = 1 to maxLabels ! Snap to vertical axis if elbowX < stickyTol and elbowX > -stickyTol then parameters elbowX = 0 endif ! Snap to horizontal axis if elbowY < stickyTol and elbowY > -stickyTol then parameters elbowY = 0 endif ! Snap to 45° if elbowX < elbowY + stickyTol and elbowX > elbowY - stickyTol then parameters elbowX = elbowY endif next i endif