Commit f64adffa by Dmitry Baranovskiy

• changed gradient syntax to "<angle>-<color>-[<color>[:<offset>]…]-<color>" in…

• changed gradient syntax to "<angle>-<color>-[<color>[:<offset>]…]-<color>" in order to make it more readable
parent 128aa56e
...@@ -472,7 +472,7 @@ var Raphael = (function () { ...@@ -472,7 +472,7 @@ var Raphael = (function () {
}; };
var toGradient = function (gradient) { var toGradient = function (gradient) {
if (typeof gradient == "string") { if (typeof gradient == "string") {
gradient = gradient.split(/\s*\/\s*/); gradient = gradient.split(/\s*\-\s*/);
var angle = gradient.shift(); var angle = gradient.shift();
if (angle.toLowerCase() == "v") { if (angle.toLowerCase() == "v") {
angle = 90; angle = 90;
...@@ -827,12 +827,6 @@ var Raphael = (function () { ...@@ -827,12 +827,6 @@ var Raphael = (function () {
case "stroke-dasharray": case "stroke-dasharray":
addDashes(o, value); addDashes(o, value);
break; break;
// case "text":
// if (o.type == "text") {
// o.node.childNodes.length && o.node.removeChild(o.node.firstChild);
// o.node.appendChild(doc.createTextNode(value));
// }
// break;
case "rotation": case "rotation":
o.rotate(value, true); o.rotate(value, true);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment