summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rakefile2
-rw-r--r--src/container.js4
-rw-r--r--src/element.js6
-rw-r--r--src/shape.js15
4 files changed, 2 insertions, 25 deletions
diff --git a/Rakefile b/Rakefile
index 1340b19..f2df30e 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,6 @@
SVGJS_VERSION = '0.1'
-DEFAULT_MODULES = %w[ svg container object element document defs group clip_path shape rect circle ellipse path image ]
+DEFAULT_MODULES = %w[ svg container object element document defs shape rect circle ellipse path image group clip_path ]
KILO = 1024 # how many bytes in a "kilobyte"
diff --git a/src/container.js b/src/container.js
index b45f184..9f13282 100644
--- a/src/container.js
+++ b/src/container.js
@@ -81,10 +81,6 @@ SVG.Container = {
return e;
},
- svg: function(v) {
- return this.place(new SVG.Nested(), v);
- },
-
rect: function(v) {
return this.place(new SVG.Rect(), v);
},
diff --git a/src/element.js b/src/element.js
index d6f4685..3dcf785 100644
--- a/src/element.js
+++ b/src/element.js
@@ -53,7 +53,7 @@ SVG.Element.prototype.parentDoc = function() {
// get parent svg wrapper
SVG.Element.prototype.parentSVG = function() {
- return this._findParent(SVG.Nested) || this.parentDoc();
+ return this.parentDoc();
};
// set svg element attribute
@@ -94,10 +94,6 @@ SVG.Element.prototype._findParent = function(pt) {
return e;
};
-// include the dispatcher object
-SVG.Element.include(SVG.Dispatcher);
-
-
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