Commit 9af591c7 by Dmitry Baranovskiy

1.4.7 Hot fix for IE insertBefore & insertAfter when you pass set as an argument.

parent fa3418b9
/*! /*!
* Raphael 1.4.6 - JavaScript Vector Library * Raphael 1.4.7 - JavaScript Vector Library
* *
* Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com) * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
...@@ -19,7 +19,7 @@ Raphael = (function () { ...@@ -19,7 +19,7 @@ Raphael = (function () {
} }
return create[apply](R, arguments); return create[apply](R, arguments);
} }
R.version = "1.4.6"; R.version = "1.4.7";
var separator = /[, ]+/, var separator = /[, ]+/,
elements = /^(circle|rect|path|ellipse|text|image)$/, elements = /^(circle|rect|path|ellipse|text|image)$/,
proto = "prototype", proto = "prototype",
...@@ -2244,6 +2244,9 @@ Raphael = (function () { ...@@ -2244,6 +2244,9 @@ Raphael = (function () {
if (this.removed) { if (this.removed) {
return this; return this;
} }
if (element.constructor == Set) {
element = element[element.length];
}
if (element.Group.nextSibling) { if (element.Group.nextSibling) {
element.Group.parentNode.insertBefore(this.Group, element.Group.nextSibling); element.Group.parentNode.insertBefore(this.Group, element.Group.nextSibling);
} else { } else {
...@@ -2256,6 +2259,9 @@ Raphael = (function () { ...@@ -2256,6 +2259,9 @@ Raphael = (function () {
if (this.removed) { if (this.removed) {
return this; return this;
} }
if (element.constructor == Set) {
element = element[0];
}
element.Group.parentNode.insertBefore(this.Group, element.Group); element.Group.parentNode.insertBefore(this.Group, element.Group);
insertbefore(this, element, this.paper); insertbefore(this, element, this.paper);
return this; return this;
......
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