summaryrefslogtreecommitdiff
path: root/dist/LightBox.ActivityIndicator.min.js
blob: 35a01298bbd97dd701373dbb054f20cde29d7561 (plain)
1
var LightBox=LightBox||{};LightBox.ActivityIndicator=function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.element=document.createElement("div"),this.element.id="imagelightbox-loading",this.element.appendChild(document.createElement("div"))}return i(t,[{key:"register",value:function(t){t.addOnLoadStartListener(this.activityIndicatorOn.bind(this)),t.addOnLoadEndListener(this.activityIndicatorOff.bind(this)),t.addOnEndListener(this.activityIndicatorOff.bind(this))}},{key:"activityIndicatorOn",value:function(){document.body.appendChild(this.element)}},{key:"activityIndicatorOff",value:function(){try{document.body.removeChild(this.element)}catch(t){}}}]),t}();e["default"]=r,t.exports=e["default"]}]);