Copyright © 2021 by K4.org
  (v.0.48.124)

A Sketch is a 2D collection of graphic elements which can be treated as a coherent set. It is intended to be the target of a UISketcher, but does not have to be.

Index

Rules

Edges

Edges: Child

Note that this assumes the polygon is closed, and creates an edge from the last to first point.

Design: LineSegments

showEdges

showEdges: Boolean

Whether the edges of the sketch should be shown.

Flags : cached, parameter

Default expression : true

sketchData

sketchData: String

The binding target for a UISketcher, or any data in the same format.

Flags : cached, parameter

Default expression : "{}"

sketchDataPojo

sketchDataPojo: Any

The parsed sketchData result.

Flags : cached

Expression : return JSON.parse(this.sketchData)

sketchPolygon

sketchPolygon: Array

The polygon/polyline of edges in sketchData. Note that this assumes that the sketch data is in a particular format.

Flags : cached

Expression : if (this.sketchDataPojo.nodes) { return this.sketchDataPojo.nodes.map(n => p(n.attributes.x, n.attributes.y, 0)); } else { return []; }