meshviewer/lib/container.js
2016-05-29 14:55:22 +02:00

24 lines
348 B
JavaScript

define([], function () {
"use strict";
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;
};
});