VulpesOS/gaia/apps/camera/js/views/loading-screen.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

38 lines
No EOL
686 B
JavaScript
Executable file

define(function(require, exports, module) {
'use strict';
var debug = require('debug')('view:loading-screen');
var View = require('view');
module.exports = View.extend({
name: 'loading-screen',
fadeTime: 300,
initialize: function() {
this.render();
},
render: function() {
this.el.innerHTML = this.template;
// Clean up
delete this.template;
debug('rendered');
return this;
},
show: function(done) {
this.reflow = this.el.offsetTop;
View.prototype.show.call(this);
},
hide: function(done) {
View.prototype.hide.call(this);
if (done) { setTimeout(done, this.fadeTime); }
},
template: '<progress></progress>'
});
});