Commit 5d708696 authored by David Schnur's avatar David Schnur

Simplify creation of the cached element.

parent ff0e5c1b
......@@ -286,25 +286,18 @@ Licensed under the MIT license.
if (info == null) {
var element = $("<div>" + text + "</div>");
var element = $("<div></div>").html(text).css({
position: "absolute",
top: -9999
});
if (typeof font === "object") {
element.css({
font: textStyle,
color: font.color,
position: "absolute",
top: -9999
});
} else if (typeof font === "string") {
element.addClass(font).css({
position: "absolute",
top: -9999
});
} else {
element.css({
position: "absolute",
top: -9999
});
element.addClass(font);
}
element.appendTo(this.container);
......
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