Skip to content

Commit

Permalink
Make loader optional and configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Lino committed Jun 7, 2015
1 parent 7cae6df commit 5c583fe
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions js/ezplus.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
options.zoomContainerAppendTo = options.appendto;
}

var loader;
if (options.loader) {
loader = options.loader;
}

$scope.$on("ezp-hidesAll", function (e, msg) {
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
Expand Down Expand Up @@ -66,9 +71,12 @@
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
if (image) {
var loader = 'images/loader-small.gif';
plugin.showHideWindow();
plugin.swaptheimage(loader, loader);
plugin.showHideWindow('hide');
plugin.showHideTint('hide');
plugin.showHideLens('hide');
if (loader) {
plugin.swaptheimage(loader, loader);
}

var initialUrl = getInitialUrl(smallUrl);
plugin.swaptheimage(initialUrl, largeUrl);
Expand Down

0 comments on commit 5c583fe

Please sign in to comment.