Commit 175fcbe0 authored by Luc Renambot's avatar Luc Renambot

Fix SAGE2_App size when requesting a DIV element


Former-commit-id: 51e86e12d7a47f6a55a02456c66e9ed812f821a6
parent 1945471f
......@@ -27,8 +27,13 @@ var SAGE2_App = Class.extend( {
this.div = document.getElementById(id);
this.element = document.createElement(elem);
this.element.className = "sageItem";
this.element.width = width;
this.element.height = height;
if (elem === "div") {
this.element.style.width = width + "px";
this.element.style.height = height + "px";
} else {
this.element.width = width;
this.element.height = height;
}
this.div.appendChild(this.element);
this.resrcPath = resrc + "/";
......
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