Permalink
Browse files

IE 11 parentElement fix

  • Loading branch information...
1 parent b5bca4b commit 7b67a148fd4d5bc9445af1a01e53d4dafd67a39c @tomasAlabes tomasAlabes committed Dec 28, 2013
Showing with 27 additions and 13 deletions.
  1. +11 −4 dev/raphael.svg.js
  2. +1 −1 eve
  3. +3 −3 raphael-min.js
  4. +12 −5 raphael.js
View
@@ -908,10 +908,17 @@ window.Raphael && window.Raphael.svg && function(R) {
var hide = true;
}
var canvasHidden = false,
- containerStyle = this.paper.canvas.parentElement.style;
- if(containerStyle.display == "none"){
- canvasHidden = true;
- containerStyle.display = "";
+ containerStyle;
+ if (this.paper.canvas.parentElement) {
+ containerStyle = this.paper.canvas.parentElement.style;
+ } //IE10+ can't find parentElement
+ else if (this.paper.canvas.parentNode) {
+ containerStyle = this.paper.canvas.parentNode.style;
+ }
+
+ if(containerStyle && containerStyle.display == "none") {
+ canvasHidden = true;
+ containerStyle.display = "";
}
var bbox = {};
try {
2 eve
Submodule eve updated 3 files
+2 −2 component.json
+1 −1 eve.js
+1 −1 package.json
View
Oops, something went wrong.
View
@@ -376,7 +376,7 @@
return "You are running Eve " + version;
};
(typeof module != "undefined" && module.exports) ? (module.exports = eve) : (typeof define != "undefined" ? (define("eve", [], function() { return eve; })) : (glob.eve = eve));
-})(this);
+})(window || this);
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ "Raphaël 2.1.0" - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
@@ -6708,10 +6708,17 @@
var hide = true;
}
var canvasHidden = false,
- containerStyle = this.paper.canvas.parentElement.style;
- if(containerStyle.display == "none"){
- canvasHidden = true;
- containerStyle.display = "";
+ containerStyle;
+ if (this.paper.canvas.parentElement) {
+ containerStyle = this.paper.canvas.parentElement.style;
+ } //IE10+ can't find parentElement
+ else if (this.paper.canvas.parentNode) {
+ containerStyle = this.paper.canvas.parentNode.style;
+ }
+
+ if(containerStyle && containerStyle.display == "none") {
+ canvasHidden = true;
+ containerStyle.display = "";
}
var bbox = {};
try {

0 comments on commit 7b67a14

Please sign in to comment.