34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Projection = void 0;
|
|
var morphux_1 = require("morphux");
|
|
var Projection = /** @class */ (function () {
|
|
function Projection(Main) {
|
|
this.container = document.querySelector(".ntsh_tab[tabid=\"projection\"]");
|
|
this._Main = Main;
|
|
this.registerTabListener();
|
|
}
|
|
Projection.prototype.createPreviewFrame = function () {
|
|
var container = (0, morphux_1.ce)('div', 'ntsh_projection');
|
|
var frame = (0, morphux_1.ce)('iframe', 'ntsh_projection-frame', {
|
|
src: "".concat(window.location.origin, "/visualization").concat(window.location.search),
|
|
});
|
|
container.appendChild(frame);
|
|
this.container.appendChild(container);
|
|
};
|
|
Projection.prototype.removePreviewFrame = function () {
|
|
this.container.innerHTML = '';
|
|
};
|
|
Projection.prototype.registerTabListener = function () {
|
|
var _this = this;
|
|
this._Main.TabController.registerListener('projection', function (visible) {
|
|
if (visible)
|
|
_this.createPreviewFrame();
|
|
else
|
|
_this.removePreviewFrame();
|
|
});
|
|
};
|
|
return Projection;
|
|
}());
|
|
exports.Projection = Projection;
|
|
//# sourceMappingURL=projection.js.map
|