This repository was archived by the owner on Apr 8, 2018. It is now read-only.
This repository was archived by the owner on Apr 8, 2018. It is now read-only.
Invalid argument (IE8) #123
Closed
Description
Line 5136 was throwing an invalid argument exception for me:
R._engine.setSize = function(width, height) {
var cs = this.canvas.style;
this.width = width;
this.height = height;
width == +width && (width += "px");
height == +height && (height += "px");
cs.width = width; //THIS LINE CAUSES ERROR
cs.height = height;
cs.clip = "rect(0 " + width + " " + height + " 0)";
if (this._viewBox) {
R._engine.setViewBox.apply(this, this._viewBox);
}
return this;
};
I changed this to
R._engine.setSize = function(width, height) {
var cs = this.canvas.style;
this.width = width;
this.height = height;
width == +width && (width += "px");
height == +height && (height += "px");
if (width == "0px") {
width = "1px";
}
if (height == "0px") {
height = "1px";
}
cs.width = width;
cs.height = height;
cs.clip = "rect(0 " + width + " " + height + " 0)";
if (this._viewBox) {
R._engine.setViewBox.apply(this, this._viewBox);
}
return this;
};
and the error goes away. But really I have absolutely no idea what I'm doing, so I figure this might be useful info for you to know. It seems that 0px is not a valid property for width or height...
Metadata
Metadata
Assignees
Labels
No labels
Activity