Carries information about a reshape operation.
Inheritance Hierarchy
Remarks
This class is mainly intended for use by collectSnapResults.
Members
No filters for this type
Constructors
Initializes a new instance of the ReshapeRectangleContext class.
Initializes a new instance of the ReshapeRectangleContext class.
Parameters
- initialLayout: Rect
- The initial layout of the node.
- minimumSize: ISize
- The minimum size of the node.
- maximumSize: ISize
- The maximum size of the node.
- minimumEnclosedArea: IRectangle
- The minimum area the node's layout needs to encompass. Providing an EMPTY rectangle will disable this restriction.
- maximumBoundingArea: IRectangle
- The maximum bounding area the node's layout may fill. Providing an INFINITE rectangle will disable this restriction.
- reshapePosition: HandlePositions
- The position of the reshape handle.
- topLeftChangeFactor: Point
- The factor by which the top left corner of the node layout changes when the handle is dragged.
- bottomRightChangeFactor: Point
- The factor by which the bottom right corner of the node layout changes when the handle is dragged.
- sizeChangeFactor: Size
- The factor by which the size of the node layout changes when the handle is dragged.
- reshapePolicy: ReshapePolicy
- The policy used for aspect ratio resizing.
- ratio: number
- The aspect ratio used for aspect ratio resizing.
Properties
Gets the factor by which the bottom right corner of the node layout changes when the handle is dragged.
Gets the factor by which the bottom right corner of the node layout changes when the handle is dragged.
readonlyfinal
Property Value
The bottom right change factor.
Gets the initial layout of the node.
Gets the initial layout of the node.
readonlyfinal
Property Value
The initial layout of the node.
Gets the maximal rectangle the node's layout may fill.
Gets the maximal rectangle the node's layout may fill.
Gets or sets the maximum size of the node.
Gets or sets the maximum size of the node.
readonlyfinal
Property Value
The maximum size.
Gets the minimum area the node's layout needs to encompass.
Gets the minimum area the node's layout needs to encompass.
readonlyfinal
Property Value
The minimum enclosed area. If the area is empty, the value can be ignored.
Gets the minimum size of the node.
Gets the minimum size of the node.
readonlyfinal
Property Value
The minimum size.
Gets the policy if and how the change in size of the reshapeable keeps the ratio during the reshape gesture.
Gets the policy if and how the change in size of the reshapeable keeps the ratio during the reshape gesture.
Gets the position of the reshape handle.
Gets the position of the reshape handle.
readonlyfinal
Property Value
The reshape position.
Gets the factor by which the size of the node layout changes when the handle is dragged.
Gets the factor by which the size of the node layout changes when the handle is dragged.
readonlyfinal
Property Value
The size change factor.
Gets the factor by which the top left corner of the node layout changes when the handle is dragged.
Gets the factor by which the top left corner of the node layout changes when the handle is dragged.
readonlyfinal
Property Value
The top left change factor.
Methods
Calculates a constraint for pointer locations so that the bottom side of the rectangle ends up at the snapLocation.
Calculates a constraint for pointer locations so that the bottom side of the rectangle ends up at the
snapLocation.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The current delta of the pointer location.
- snapLocation: number
- The y-coordinate at which the bottom rectangle side should end up.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the bottom side of the rectangle to end up at the
snapLocationornullif there are no pointer locations insnapDistancethat would move the bottom rectangle side tosnapLocation.
Calculates a constraint for pointer locations so that the node height ends up to be height.
Calculates a constraint for pointer locations so that the node height ends up to be
height.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The delta of the pointer location.
- height: number
- The new height of the node layout.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the node height to
heightornullif there are no pointer locations insnapDistancesatisfying the size change.
Calculates a constraint for pointer locations so that the left side of the rectangle ends up at the snapLocation.
Calculates a constraint for pointer locations so that the left side of the rectangle ends up at the
snapLocation.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The delta of the pointer location.
- snapLocation: number
- The horizontal coordinate at which the left rectangle side should end up.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the left side of the rectangle to end up at the
snapLocationornullif there are no pointer locations insnapDistancethat would move the left rectangle side tosnapLocation.
Calculates a constraint for pointer locations so that the right side of the rectangle ends up at the snapLocation.
Calculates a constraint for pointer locations so that the right side of the rectangle ends up at the
snapLocation.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The delta of the pointer location.
- snapLocation: number
- The horizontal coordinate at which the right rectangle side should end up.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the right side of the rectangle to end up at the
snapLocationornullif there are no pointer locations insnapDistancethat would move the right rectangle side tosnapLocation.
Calculates a constraint for pointer locations so that the top side of the rectangle ends up at the snapLocation.
Calculates a constraint for pointer locations so that the top side of the rectangle ends up at the
snapLocation.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The delta of the pointer location.
- snapLocation: number
- The vertical coordinate at which the top rectangle side should end up.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the top side of the rectangle to end up at the
snapLocationornullif there are no pointer locations insnapDistancethat would move the top rectangle side tosnapLocation.
Calculates a constraint for pointer locations so that the node width ends up being width.
Calculates a constraint for pointer locations so that the node width ends up being
width.The preferred location of the returned constraint uses the minimum pointer delta from the current location described by the
delta.final
Parameters
- evt: CollectSnapResultsEventArgs
- The event argument to obtain the context from.
- suggestedLayout: Rect
- The suggested, unsnapped layout.
- delta: Point
- The delta of the pointer location.
- width: number
- The new width of the node layout.
- snapDistance: number
- A maximum valid distance from the current pointer location.
Return Value
- SnapConstraint
- A SnapConstraint for pointer locations that change the node width to
widthornullif there are no pointer locations insnapDistancesatisfying the size change.