From: lindsayevans Date: Thu, 21 May 2009 05:20:27 +0000 (+0800) Subject: Fixes SVG capability detection bug in Safari 3.0.4 (http://github.com/DmitryBaranovsk... X-Git-Tag: semver~69 X-Git-Url: http://git.roojs.org/?p=raphael;a=commitdiff_plain;h=2dbef68feeb78d4691ce466c45e0a7cccf13872e Fixes SVG capability detection bug in Safari 3.0.4 (github.com/DmitryBaranovskiy/raphael/issues/#issue/14) Signed-off-by: Dmitry Baranovskiy --- diff --git a/raphael.js b/raphael.js index 36d76d7..a7222bb 100644 --- a/raphael.js +++ b/raphael.js @@ -18,7 +18,8 @@ window.Raphael = (function () { availableAnimAttrs = {cx: "number", cy: "number", fill: "colour", "fill-opacity": "number", "font-size": "number", height: "number", opacity: "number", path: "path", r: "number", rotation: "csv", rx: "number", ry: "number", scale: "csv", stroke: "colour", "stroke-opacity": "number", "stroke-width": "number", translation: "csv", width: "number", x: "number", y: "number"}, events = ["click", "dblclick", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup"]; R.version = "0.7.4"; - R.type = (window.SVGAngle ? "SVG" : "VML"); + R.type = (window.SVGAngle || document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") + ? "SVG" : "VML"); R.svg = !(R.vml = R.type == "VML"); R.idGenerator = 0; R.fn = {};