IE appears to be choking on the following line 2207 from the uncompressed raphaeljs 1.4.7 (in the context of my code, of course):
gs.left != (t = left + "px") && (gs.left = t);
I'm unfamiliar with the != syntax in this context so I'm finding difficult to figure out what is going on or why IE might be unhappy about it. I've tested in IE6 & IE8, and Chrome & Firefox on OSX. Of course I'd step through using firebug if it was a problem in FF...
Can you tell me what that line is trying to achieve, and even better, can you see why IE might potentially be having a problem with it?
For your context, here's the full method with that line in it:
Element[proto].setBox = function (params, cx, cy) {
if (this.removed) {
return this;
}
var gs = this.Group.style,
os = (this.shape && this.shape.style) || this.node.style;
params = params || {};
for (var i in params) if (params[has](i)) {
this.attrs[i] = params[i];
}
cx = cx || this._.rt.cx;
cy = cy || this._.rt.cy;
var attr = this.attrs,
x,
y,
w,
h;
switch (this.type) {
case "circle":
x = attr.cx - attr.r;
y = attr.cy - attr.r;
w = h = attr.r * 2;
break;
case "ellipse":
x = attr.cx - attr.rx;
y = attr.cy - attr.ry;
w = attr.rx * 2;
h = attr.ry * 2;
break;
case "image":
x = +attr.x;
y = +attr.y;
w = attr.width || 0;
h = attr.height || 0;
break;
case "text":
this.textpath.v = ["m", round(attr.x), ", ", round(attr.y - 2), "l", round(attr.x) + 1, ", ", round(attr.y - 2)][join](E);
x = attr.x - round(this.W / 2);
y = attr.y - this.H / 2;
w = this.W;
h = this.H;
break;
case "rect":
case "path":
if (!this.attrs.path) {
x = 0;
y = 0;
w = this.paper.width;
h = this.paper.height;
} else {
var dim = pathDimensions(this.attrs.path);
x = dim.x;
y = dim.y;
w = dim.width;
h = dim.height;
}
break;
default:
x = 0;
y = 0;
w = this.paper.width;
h = this.paper.height;
break;
}
cx = (cx == null) ? x + w / 2 : cx;
cy = (cy == null) ? y + h / 2 : cy;
var left = cx - this.paper.width / 2,
top = cy - this.paper.height / 2, t;
gs.left != (t = left + "px") && (gs.left = t);
gs.top != (t = top + "px") && (gs.top = t);
this.X = pathlike[has](this.type) ? -left : x;
this.Y = pathlike[has](this.type) ? -top : y;
this.W = w;
this.H = h;
if (pathlike[has](this.type)) {
os.left != (t = -left * zoom + "px") && (os.left = t);
os.top != (t = -top * zoom + "px") && (os.top = t);
} else if (this.type == "text") {
os.left != (t = -left + "px") && (os.left = t);
os.top != (t = -top + "px") && (os.top = t);
} else {
gs.width != (t = this.paper.width + "px") && (gs.width = t);
gs.height != (t = this.paper.height + "px") && (gs.height = t);
os.left != (t = x - left + "px") && (os.left = t);
os.top != (t = y - top + "px") && (os.top = t);
os.width != (t = w + "px") && (os.width = t);
os.height != (t = h + "px") && (os.height = t);
}
};