--- layout: posts title: Api - ICascadePath Interface ---
Use the $original as the $result.
The current final value of the cascade.
Add a path to a model. This is basically equivalent to:
parentModel.paths[pathId] = childPath;
with additional checks to make it safe for cascading.
The model to add to.
The id of the path.
(default false) Optional flag to overwrite any path referenced by pathId. Default is false, which will create an id similar to pathId.
this cascade container, this.$result will be The original path (for cascading).
Alter a path by lengthening or shortening it.
Numeric amount of length to add or remove from the path. Use a positive number to lengthen, negative to shorten. When shortening: this function will not alter the path and will return null if the resulting path length is less than or equal to zero.
(default false) Optional flag to alter from the origin instead of the end of the path.
this cascade container, this.$result will be The original path (for cascading), or null if the path could not be altered.
Breaks a path in two. The supplied path will end at the supplied pointOfBreak, a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point. For Circle, the original path will be converted in place to an Arc, and null is returned.
The point at which to break the path.
this cascade container, this.$result will be A new path of the same type, when path type is line or arc. Returns null for circle.
Center a path at [0, 0].
this cascade container, this.$result will be The original path (for cascading).
Create a clone of a path. This is faster than cloneObject.
Optional point to move path a relative distance.
this cascade container, this.$result will be Cloned path.
Copy the schema properties of one path to another.
The destination path to copy property values to.
this cascade container, this.$result will be The source path.
Set the layer of a path. This is equivalent to:
pathContext.layer = layer;
The layer name.
this cascade container, this.$result will be The original path (for cascading).
Create a clone of a path, mirrored on either or both x and y axes.
Boolean to mirror on the x axis.
Boolean to mirror on the y axis.
this cascade container, this.$result will be Mirrored path.
Move a path to an absolute point.
The new origin for the path.
this cascade container, this.$result will be The original path (for cascading).
Move a path's origin by a relative amount.
The x & y adjustments as a point object.
Optional boolean to subtract instead of add.
this cascade container, this.$result will be The original path (for cascading).
Rotate a path.
The amount of rotation, in degrees.
(default [0, 0]) The center point of rotation.
this cascade container, this.$result will be The original path (for cascading).
Scale a path.
The amount of scaling.
this cascade container, this.$result will be The original path (for cascading).
Move a path so its bounding box begins at [0, 0].
this cascade container, this.$result will be The original path (for cascading).
Generated using TypeDoc
The initial context object of the cascade.