From 87a94412aaeb1a54005c7f793af7b20113ad0637 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Fri, 10 Apr 2020 15:41:57 +1000 Subject: added tests for Path --- src/elements/Line.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/elements/Line.js') diff --git a/src/elements/Line.js b/src/elements/Line.js index b9982f4..1b72a7d 100644 --- a/src/elements/Line.js +++ b/src/elements/Line.js @@ -24,6 +24,11 @@ export default class Line extends Shape { ]) } + // Move by left top corner + move (x, y) { + return this.attr(this.array().move(x, y).toLine()) + } + // Overwrite native plot() method plot (x1, y1, x2, y2) { if (x1 == null) { @@ -37,11 +42,6 @@ export default class Line extends Shape { return this.attr(x1) } - // Move by left top corner - move (x, y) { - return this.attr(this.array().move(x, y).toLine()) - } - // Set element size to given width and height size (width, height) { var p = proportionalSize(this, width, height) -- cgit v1.2.3