You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Danny Brown edited this page Feb 5, 2019
·
2 revisions
This documentation is for a much older version of cornerstone-tools. While it may still loosely apply, more recent information can be found at https://tools.cornerstonejs.org
Another common scenario is for a tool to support moving or repositioning itself. For example, a user may want to adjust one end of the length measurement by dragging it to a new location. Cornerstone calls these draggable points handles and provides the following helper functions:
findHandleNear() - Given an array of handles and a pixel point, returns a handle that the pixel point is inside of or undefined if none.
handleCursorNearHandle() - Given an array of handles and a pixel point, starts moving the handle if the pixel point is inside a handle.
drawHandles - Given an array of handles, draws them on the screen using a line width of 1 screen pixel.
activateNearbyHandle - Given an array of handles and a pixel point, activates handles that the pixel point is inside of.