summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/core/poly.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/core/poly.js b/src/modules/core/poly.js
index 340bdd1..d96d1bc 100644
--- a/src/modules/core/poly.js
+++ b/src/modules/core/poly.js
@@ -6,13 +6,6 @@ export function array () {
return this._array || (this._array = new PointArray(this.attr('points')))
}
-// Plot new path
-export function plot (p) {
- return (p == null) ? this.array()
- : this.clear().attr('points', typeof p === 'string' ? p
- : (this._array = new PointArray(p)))
-}
-
// Clear array cache
export function clear () {
delete this._array
@@ -24,6 +17,13 @@ export function move (x, y) {
return this.attr('points', this.array().move(x, y))
}
+// Plot new path
+export function plot (p) {
+ return (p == null) ? this.array()
+ : this.clear().attr('points', typeof p === 'string' ? p
+ : (this._array = new PointArray(p)))
+}
+
// Set element size to given width and height
export function size (width, height) {
const p = proportionalSize(this, width, height)