aboutsummaryrefslogtreecommitdiffstats
path: root/src/elements/Line.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-04-10 15:41:57 +1000
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-04-10 15:41:57 +1000
commit87a94412aaeb1a54005c7f793af7b20113ad0637 (patch)
tree0728a6569ac3f89b65af909d533c2e88a6808049 /src/elements/Line.js
parente6fda9da8f777786a98c9351f33823241ce864fd (diff)
downloadsvg.js-87a94412aaeb1a54005c7f793af7b20113ad0637.tar.gz
svg.js-87a94412aaeb1a54005c7f793af7b20113ad0637.zip
added tests for Path
Diffstat (limited to 'src/elements/Line.js')
-rw-r--r--src/elements/Line.js10
1 files changed, 5 insertions, 5 deletions
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)