Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AnchorRestraint

An object with an x and/or y field that describes the CoordinateRestraint for a Custom Drawing Tool's Anchor at the matching array position.


 const MyCustomTool = {
     //...

     //the anchor at position [0] can move 2 units in the Y axis and the
     //anchor at position [1] can move 14 units in the X axis
     anchorRestraints() {
         return [{y: 2}, {x: 14}]
     },

     //the anchor at position [0] can move between the 4525 and 4535 price in the Y axis
     anchorRestraints() {
         return [{y: [4525, 4535]}]
     },

     //...
 }

Hierarchy

  • AnchorRestraint

Properties

x
y

Properties

Generated using TypeDoc