C

ReshapeRectangleContext

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.

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.
readonlyfinal

Property Value

The bottom right change factor.
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.
The value is stored by reference. The default is INFINITE, which does not restrict the area at all.
readonlyfinal

Property Value

The maximum bounding area. If the area is INFINITE the value can be ignored.
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.
readonlyfinal

Property Value

The minimum enclosed area. If the area is empty, the value can be ignored.
Gets the minimum size of the node.
readonlyfinal

Property Value

The minimum size.
Gets the ratio between the change of the width and the change of the height that is kept during the reshape gesture.
This ratio has to be considered if reshapePolicy is not NONE.
readonlyfinal

See Also

API
reshapePolicy
Gets the policy if and how the change in size of the reshapeable keeps the ratio during the reshape gesture.
readonlyfinal

Property Value

The policy if and how the change in size of the reshapeable keeps the ratio during the reshape gesture.

See Also

API
ratio
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.
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.
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.
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 snapLocation or null if there are no pointer locations in snapDistance that would move the bottom rectangle side to snapLocation.
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 height or null if there are no pointer locations in snapDistance satisfying the size change.
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 snapLocation or null if there are no pointer locations in snapDistance that would move the left rectangle side to 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 snapLocation or null if there are no pointer locations in snapDistance that would move the right rectangle side to 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 snapLocation or null if there are no pointer locations in snapDistance that would move the top rectangle side to snapLocation.
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 width or null if there are no pointer locations in snapDistance satisfying the size change.
Calculates the layout of the node when the pointer would be moved delta from the initial location.
final

Parameters

delta: Point
The delta of the pointer location.

Return Value

Rect
The calculated layout if the pointer would be moved by the given delta.