| Package | com.yworks.canvas.input.snapLines |
| Class | public class SnapState |
| Inheritance | SnapState Object |
SnapContext to process snap results.
See also
| Property | Defined By | ||
|---|---|---|---|
| location : IPoint
The current location. | SnapState | ||
| snapType : uint
Gets or sets the type of the snap. | SnapState | ||
| Method | Defined By | ||
|---|---|---|---|
Initializes a new instance of the SnapState class. | SnapState | ||
Sets the location to the given point and adjusts the snapType accordingly. | SnapState | ||
snapX(newX:Number):void
Modifies the x property of the location and adjusts the snapType accordingly. | SnapState | ||
snapY(newY:Number):void
Modifies the y property of the location and adjusts the snapType accordingly. | SnapState | ||
toString():String
Returns a String representation of this SnapState containing it's
location and snapType. | SnapState | ||
| location | property |
location:IPoint
The current location.
The value can be adjusted using the snapX, snapY and snapTo methods.
public function get location():IPoint public function set location(value:IPoint):voidSee also
| snapType | property |
snapType:uintGets or sets the type of the snap.
public function get snapType():uint public function set snapType(value:uint):void| SnapState | () | Constructor |
public function SnapState(point:IPoint, snapType:uint = 100)
Initializes a new instance of the SnapState class.
point:IPoint — The initial location.
| |
snapType:uint (default = 100) — The current type of the snap.
|
| snapTo | () | method |
public function snapTo(newLocation:IPoint):void
Sets the location to the given point and adjusts the snapType accordingly.
Parameters
newLocation:IPoint — The new location.
|
See also
| snapX | () | method |
public function snapX(newX:Number):void
Modifies the x property of the location and adjusts the snapType accordingly.
Parameters
newX:Number — The new x.
|
See also
| snapY | () | method |
public function snapY(newY:Number):void
Modifies the y property of the location and adjusts the snapType accordingly.
Parameters
newY:Number — The new y.
|
See also
| toString | () | method |
public function toString():String
Returns a String representation of this SnapState containing it's
location and snapType.
String |