Commit 9c672c81 authored by Tomas Alabes's avatar Tomas Alabes

Merge pull request #1030 from ipetropolsky/gradient-location-origin

Fix oldschool browsers (incl. #998)
parents f803b084 7e704f68
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël @VERSION - JavaScript Vector Library │ \\
// │ Raphaël @@VERSION - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
......
......@@ -5366,7 +5366,15 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete window.Raphael;
if (oldRaphael.was) {
g.win.Raphael = oldRaphael.is;
} else {
// IE8 raises an error when deleting window property
window.Raphael = undefined;
try {
delete window.Raphael;
} catch(e) {}
}
return R;
};
/*\
......
......@@ -160,7 +160,13 @@
return "url('#" + id + "')";
}
var location = document.location;
return "url('" + location.origin + location.pathname + location.search + "#" + id + "')";
var locationString = (
location.protocol + '//' +
location.host +
location.pathname +
location.search
);
return "url('" + locationString + "#" + id + "')";
},
updatePosition = function (o) {
var bbox = o.getBBox(1);
......
......@@ -18,8 +18,8 @@
<!--<script type="text/javascript">
// Initialize container when document is loaded
window.onload = function () {
paper = Raphael(0, 0, 640, 720, "container");
paper.circle(100, 100, 100); //example
var paper = Raphael(0, 0, 640, 720, "container");
paper.circle(100, 100, 100).attr({'fill':'270-#FAE56B:0-#E56B6B:100'}); //example
};
//Work here, in a separate script file or via command line
</script>-->
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5366,7 +5366,15 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete window.Raphael;
if (oldRaphael.was) {
g.win.Raphael = oldRaphael.is;
} else {
// IE8 raises an error when deleting window property
window.Raphael = undefined;
try {
delete window.Raphael;
} catch(e) {}
}
return R;
};
/*\
......@@ -5575,7 +5583,13 @@
return "url('#" + id + "')";
}
var location = document.location;
return "url('" + location.origin + location.pathname + location.search + "#" + id + "')";
var locationString = (
location.protocol + '//' +
location.host +
location.pathname +
location.search
);
return "url('" + locationString + "#" + id + "')";
},
updatePosition = function (o) {
var bbox = o.getBBox(1);
......@@ -7868,7 +7882,7 @@
}));
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël @VERSION - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
......
......@@ -5748,7 +5748,15 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete window.Raphael;
if (oldRaphael.was) {
g.win.Raphael = oldRaphael.is;
} else {
// IE8 raises an error when deleting window property
window.Raphael = undefined;
try {
delete window.Raphael;
} catch(e) {}
}
return R;
};
/*\
......@@ -5957,7 +5965,13 @@
return "url('#" + id + "')";
}
var location = document.location;
return "url('" + location.origin + location.pathname + location.search + "#" + id + "')";
var locationString = (
location.protocol + '//' +
location.host +
location.pathname +
location.search
);
return "url('" + locationString + "#" + id + "')";
},
updatePosition = function (o) {
var bbox = o.getBBox(1);
......@@ -8250,7 +8264,7 @@
}));
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël @VERSION - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
......
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 to comment