aboutsummaryrefslogtreecommitdiffstats
path: root/src/shape.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-17 12:40:43 +0100
committerwout <wout@impinc.co.uk>2012-12-17 12:40:43 +0100
commit10fd4e46ed729b6471074d925d3a3e611b13688e (patch)
tree4b3b5d1d86bf6f2cd7c16e1341371e55237329d4 /src/shape.js
parent137bc169b4e1bcdcbb37e9beec3e2d9b7d9da85f (diff)
downloadsvg.js-10fd4e46ed729b6471074d925d3a3e611b13688e.tar.gz
svg.js-10fd4e46ed729b6471074d925d3a3e611b13688e.zip
Removing legacy references
Diffstat (limited to 'src/shape.js')
-rw-r--r--src/shape.js15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/shape.js b/src/shape.js
index 236b33e..194ff84 100644
--- a/src/shape.js
+++ b/src/shape.js
@@ -8,8 +8,6 @@ SVG.Shape.prototype = new SVG.Element();
// set fill color and opacity
SVG.Shape.prototype.fill = function(fill) {
- this._formatColor(fill);
-
if (fill.color != null)
this.setAttribute('fill', fill.color);
@@ -21,8 +19,6 @@ SVG.Shape.prototype.fill = function(fill) {
// set stroke color and opacity
SVG.Shape.prototype.stroke = function(stroke) {
- this._formatColor(stroke);
-
if (stroke.color != null)
this.setAttribute('stroke', stroke.color);
@@ -36,15 +32,4 @@ SVG.Shape.prototype.stroke = function(stroke) {
this.fill({ opacity: 0 });
return this;
-};
-
-// ensure correct color string
-SVG.Shape.prototype._formatColor = function(obj) {
- if (typeof obj.color === 'number') {
- obj.color = '' + obj.color.toString(16);
- while (obj.color.length < 6)
- obj.color = '0' + obj.color;
-
- return obj.color = '#' + obj.color;
- }
}; \ No newline at end of file