X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=raphael.js;h=75728ffa68c12948c7e5604b015880bae8ee41f1;hb=61f72045caa90d2a7dc79bba26181705dcada2aa;hp=59fc1ec4c3013acddaee4b9df72b80d0c01b4af5;hpb=c2180d09d490967447245fcb86f3936f2c6a5b40;p=raphael diff --git a/raphael.js b/raphael.js index 59fc1ec..75728ff 100644 --- a/raphael.js +++ b/raphael.js @@ -227,6 +227,7 @@ // │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ // │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ // └─────────────────────────────────────────────────────────────────────┘ \\ + (function () { function R(first) { @@ -2018,37 +2019,7 @@ elproto = R.el = {}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + for (var i = events.length; i--;) { (function (eventName) { R[eventName] = elproto[eventName] = function (fn, scope) { @@ -3394,6 +3365,7 @@ }); })(); + // ┌─────────────────────────────────────────────────────────────────────┐ \\ // │ Raphaël - JavaScript Vector Library │ \\ // ├─────────────────────────────────────────────────────────────────────┤ \\ @@ -3908,6 +3880,9 @@ window.Raphael.svg && function (R) { break; } clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity}); + // falls through (this is where setting is done...) + + case "stroke": clr = R.getRGB(value); node.setAttribute(att, clr.hex); @@ -4207,11 +4182,13 @@ window.Raphael.svg && function (R) { for (var key in params) { eve("attr." + key + "." + this.id, this, params[key]); } - for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { - var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); - this.attrs[key] = params[key]; - for (var subkey in par) if (par[has](subkey)) { - params[subkey] = par[subkey]; + for (key in this.paper.customAttributes) { + if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { + var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); + this.attrs[key] = params[key]; + for (var subkey in par) if (par[has](subkey)) { + params[subkey] = par[subkey]; + } } } setFillAndStroke(this, params); @@ -4494,6 +4471,8 @@ window.Raphael.svg && function (R) { // │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ // │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ // └─────────────────────────────────────────────────────────────────────┘ \\ + + window.Raphael.vml && function (R) { var has = "hasOwnProperty", Str = String, @@ -4632,6 +4611,7 @@ window.Raphael.vml && function (R) { stroke[se + "arrowwidth"] = h; }, setFillAndStroke = function (o, params) { + //Roo.log( ['setFillAndStroke' , o, params]); // o.paper.canvas.style.display = "none"; o.attrs = o.attrs || {}; var node = o.node,