diff options
author | wout <wout@impinc.co.uk> | 2013-03-24 20:25:27 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-03-24 20:25:27 +0100 |
commit | a0076d75bbac8f2c128f9b34e976bcb1ea3caa09 (patch) | |
tree | 381e86815fb236a01d607017c01050d42264952a /dist/svg.js | |
parent | 20e9f674cb11d0f856baf7e05517cbebda31fdb8 (diff) | |
download | svg.js-a0076d75bbac8f2c128f9b34e976bcb1ea3caa09.tar.gz svg.js-a0076d75bbac8f2c128f9b34e976bcb1ea3caa09.zip |
Added plot() method to SVG.Line
Diffstat (limited to 'dist/svg.js')
-rw-r--r-- | dist/svg.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dist/svg.js b/dist/svg.js index 89aa45d..351776a 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -1,4 +1,4 @@ -/* svg.js v0.11 - svg regex default color viewbox bbox element container fx event group arrange defs mask clip pattern gradient doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */ +/* svg.js v0.11-4-g20e9f67 - svg regex default color viewbox bbox element container fx event group arrange defs mask clip pattern gradient doc shape rect ellipse line poly path plotable image text nested sugar - svgjs.com/license */ ;(function() { this.SVG = function(element) { @@ -846,7 +846,7 @@ } // Create a line element , line: function(x1, y1, x2, y2) { - return this.put(new SVG.Line().attr({ x1: x1, y1: y1, x2: x2, y2: y2 })) + return this.put(new SVG.Line().plot(x1, y1, x2, y2)) } // Create a wrapped polyline element , polyline: function(points) { @@ -1740,6 +1740,15 @@ .attr(this.attr('x1') < this.attr('x2') ? 'x2' : 'x1', b.x + width) .attr(this.attr('y1') < this.attr('y2') ? 'y2' : 'y1', b.y + height) } + // Set path data + , plot: function(x1, y1, x2, y2) { + return this.attr({ + x1: x1 + , y1: y1 + , x2: x2 + , y2: y2 + }) + } }) |