meshviewer/lib/container.js
2016-05-22 16:01:24 +02:00

22 lines
331 B
JavaScript

define([], function () {
return function (tag) {
if (!tag) {
tag = "div";
}
var self = this;
var container = document.createElement(tag);
self.add = function (d) {
d.render(container);
};
self.render = function (el) {
el.appendChild(container);
};
return self;
};
});