From 5d77bc580a389999a6e4433defdad43726409426 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 17 Dec 2012 19:52:09 +0100 Subject: New dist --- dist/svg.js | 33 --------------------------------- dist/svg.min.js | 2 +- 2 files changed, 1 insertion(+), 34 deletions(-) (limited to 'dist') diff --git a/dist/svg.js b/dist/svg.js index f0b8cc8..62d32af 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -311,39 +311,6 @@ // inherit from SVG.Element SVG.Shape.prototype = new SVG.Element(); - - // Add shape-specific functions - SVG.Utils.merge(SVG.Shape, { - - // set fill color and opacity - fill: function(f) { - if (f.color != null) - this.attr('fill', f.color); - - if (f.opacity != null) - this.attr('fill-opacity', f.opacity); - - return this; - }, - - // set stroke color and opacity - stroke: function(s) { - if (s.color) - this.attr('stroke', s.color); - - if (s.width != null) - this.attr('stroke-width', s.width); - - if (s.opacity != null) - this.attr('stroke-opacity', s.opacity); - - if (this.attrs['fill-opacity'] == null) - this.fill({ opacity: 0 }); - - return this; - } - - }); SVG.Rect = function Rect() { this.constructor.call(this, SVG.create('rect')); diff --git a/dist/svg.min.js b/dist/svg.min.js index c8f59e5..e5c2696 100644 --- a/dist/svg.min.js +++ b/dist/svg.min.js @@ -1,2 +1,2 @@ /* svg.js 0.1 - svg utils container element doc defs shape rect circle ellipse path image g clip - svgjs.com/license */ -(function(){this.SVG={ns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",create:function(e){return document.createElementNS(this.ns,e)}},this.svg=function(e){return new SVG.Doc(e)},SVG.Utils={merge:function(e,t){for(var n in t)e.prototype[n]=t[n]}},SVG.Container={add:function(e){return this.addAt(e)},addAt:function(e,t){return this.contains(e)||(t=t==null?this.children().length:t,this.children().splice(t,0,e),this.node.insertBefore(e.node,this.node.childNodes[t+1]),e.parent=this),this},contains:function(e){return Array.prototype.indexOf.call(this.children(),e)>=0},children:function(){return this._children||[]},sendBack:function(e){var t=this.children().indexOf(e);if(t!==-1)return this.remove(e).addAt(e,t-1)},bringForward:function(e){var t=this.children().indexOf(e);if(t!==-1)return this.remove(e).addAt(e,t+1)},bringToFront:function(e){return this.contains(e)&&this.remove(e).add(e),this},sendToBottom:function(e){return this.contains(e)&&this.remove(e).addAt(e,0),this},remove:function(e){return this.removeAt(this.children().indexOf(e))},removeAt:function(e){if(0<=e&&e=0},children:function(){return this._children||[]},sendBack:function(e){var t=this.children().indexOf(e);if(t!==-1)return this.remove(e).addAt(e,t-1)},bringForward:function(e){var t=this.children().indexOf(e);if(t!==-1)return this.remove(e).addAt(e,t+1)},bringToFront:function(e){return this.contains(e)&&this.remove(e).add(e),this},sendToBottom:function(e){return this.contains(e)&&this.remove(e).addAt(e,0),this},remove:function(e){return this.removeAt(this.children().indexOf(e))},removeAt:function(e){if(0<=e&&e