Skip to content

Commit

Permalink
Hide loading indicator after image loads.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstraw committed Aug 3, 2016
1 parent 730cee6 commit 8796982
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 24 deletions.
33 changes: 17 additions & 16 deletions dist/Luminous.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Object.defineProperty(exports, "__esModule", {
value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _dom = require('./util/dom');

var _throwIfMissing = require('./util/throwIfMissing');
Expand All @@ -24,7 +24,7 @@ var RIGHT_ARROW = 39;
// account for, just in case.
var HAS_ANIMATION = typeof document === 'undefined' ? false : 'animation' in document.createElement('div').style;

var Lightbox = (function () {
var Lightbox = function () {
function Lightbox() {
var _this = this;

Expand Down Expand Up @@ -216,9 +216,9 @@ var Lightbox = (function () {
}

var loadingClasses = this._buildClasses('loading');
(0, _dom.addClasses)(this.imgEl, loadingClasses);
(0, _dom.addClasses)(this.el, loadingClasses);
this.imgEl.onload = function () {
(0, _dom.removeClasses)(_this2.imgEl, loadingClasses);
(0, _dom.removeClasses)(_this2.el, loadingClasses);
};

this.imgEl.setAttribute('src', imageURL);
Expand Down Expand Up @@ -279,14 +279,14 @@ var Lightbox = (function () {
}]);

return Lightbox;
})();
}();

exports.default = Lightbox;

},{"./util/dom":6,"./util/throwIfMissing":7}],2:[function(require,module,exports){
'use strict';

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _class, _temp, _initialiseProps;

Expand All @@ -304,7 +304,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

module.exports = (_temp = _class = (function () {
module.exports = (_temp = _class = function () {
function Luminous(trigger) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

Expand Down Expand Up @@ -441,7 +441,7 @@ module.exports = (_temp = _class = (function () {
}]);

return Luminous;
})(), _initialiseProps = function () {
}(), _initialiseProps = function _initialiseProps() {
var _this = this;

this.VERSION = '0.3.0';
Expand Down Expand Up @@ -505,12 +505,12 @@ module.exports = (_temp = _class = (function () {
},{"./Lightbox":1,"./injectBaseStylesheet":4,"./util/dom":6}],3:[function(require,module,exports){
'use strict';

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Object.defineProperty(exports, "__esModule", {
value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _dom = require('./util/dom');

var _Luminous = require('./Luminous');
Expand All @@ -521,7 +521,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var LuminousGallery = (function () {
var LuminousGallery = function () {
function LuminousGallery(triggers) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var luminousOpts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
Expand All @@ -533,6 +533,7 @@ var LuminousGallery = (function () {
var _options$arrowNavigat = options.arrowNavigation;
var arrowNavigation = _options$arrowNavigat === undefined ? true : _options$arrowNavigat;


this.settings = { arrowNavigation: arrowNavigation };

this.triggers = triggers;
Expand Down Expand Up @@ -574,7 +575,7 @@ var LuminousGallery = (function () {
}]);

return LuminousGallery;
})();
}();

exports.default = LuminousGallery;

Expand Down Expand Up @@ -626,12 +627,12 @@ global.LuminousGallery = _LuminousGallery2.default;
Object.defineProperty(exports, "__esModule", {
value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };

exports.isDOMElement = isDOMElement;
exports.addClasses = addClasses;
exports.removeClasses = removeClasses;

function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }

// This is not really a perfect check, but works fine.
// From http://stackoverflow.com/questions/384286
var HAS_DOM_2 = (typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === 'object';
Expand Down
Loading

0 comments on commit 8796982

Please sign in to comment.