X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=raphael.core.js;h=8344f1476eaed14f4463f2ad77ac1275dd221d93;hb=refs%2Fheads%2Fmaster;hp=d8d7e47c5f505f7c27f23b429a128088f86919a3;hpb=10c3e3b7f40663906c5e34765df881abacc1640b;p=raphael diff --git a/raphael.core.js b/raphael.core.js index d8d7e47..8344f14 100644 --- a/raphael.core.js +++ b/raphael.core.js @@ -5,6 +5,7 @@ // │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\ // │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\ // └─────────────────────────────────────────────────────────────────────┘ \\ + (function () { /*\ * Raphael @@ -305,7 +306,8 @@ ** * Can be “SVG”, “VML” or empty, depending on browser support. \*/ - R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); + R.type = (g.win.SVGAngle || + g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); if (R.type == "VML") { var d = g.doc.createElement("div"), b; @@ -337,9 +339,10 @@ ** * You can add your own method to the canvas. For example if you want to draw a pie chart, * you can create your own pie chart function and ship it as a Raphaël plugin. To do this - * you need to extend the `Raphael.fn` object. Please note that you can create your own namespaces - * inside the `fn` object — methods will be run in the context of canvas anyway. You should alter - * the `fn` object before a Raphaël instance is created, otherwise it will take no effect. + * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a + * Raphaël instance is created, otherwise it will take no effect. Please note that the + * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to + * ensure any namespacing ensures proper context. > Usage | Raphael.fn.arrow = function (x1, y1, x2, y2, size) { | return this.path( ... ); @@ -4564,7 +4567,7 @@ | width = 40, | height = 50; | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z" - | paper.path(Raphael.format("M{1},{2}h{3}v{4}h{5}z", x, y, width, height, -width)); + | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width)); \*/ R.format = function (token, params) { var args = R.is(params, array) ? [0][concat](params) : arguments; @@ -4678,4 +4681,4 @@ eve.on("DOMload", function () { loaded = true; }); -})(); \ No newline at end of file +})();