Initial commit
This commit is contained in:
37
frontend/views/dashboard/dist/calibration.js
vendored
Normal file
37
frontend/views/dashboard/dist/calibration.js
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Calibration = void 0;
|
||||
var Calibration = /** @class */ (function () {
|
||||
function Calibration(Main) {
|
||||
this.container = document.querySelector('.ntsh_calibration');
|
||||
this.image = this.container.querySelector('img');
|
||||
this.fullscreenButton = this.container.querySelector('.ntsh_calibration-fullscreen');
|
||||
this._Main = Main;
|
||||
this.registerListeners();
|
||||
}
|
||||
Calibration.prototype.startFetchClock = function () {
|
||||
var _this = this;
|
||||
this.image.src = "/calibrationImage?t=".concat(Date.now());
|
||||
this.fetchClock = setInterval(function () {
|
||||
_this.image.src = "/calibrationImage?t=".concat(Date.now());
|
||||
}, 1000);
|
||||
};
|
||||
Calibration.prototype.stopFetchClock = function () {
|
||||
clearInterval(this.fetchClock);
|
||||
};
|
||||
Calibration.prototype.registerListeners = function () {
|
||||
var _this = this;
|
||||
this._Main.TabController.registerListener('calibration', function (visible) {
|
||||
if (visible)
|
||||
_this.startFetchClock();
|
||||
else
|
||||
_this.stopFetchClock();
|
||||
});
|
||||
this.fullscreenButton.addEventListener('click', function () {
|
||||
_this.image.requestFullscreen();
|
||||
});
|
||||
};
|
||||
return Calibration;
|
||||
}());
|
||||
exports.Calibration = Calibration;
|
||||
//# sourceMappingURL=calibration.js.map
|
||||
Reference in New Issue
Block a user