From 5c583feb8b148272b605cff3164997b9a715dfb6 Mon Sep 17 00:00:00 2001 From: Igor Lino Date: Sun, 7 Jun 2015 18:29:33 +0200 Subject: [PATCH] Make loader optional and configurable. --- js/ezplus.directive.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/js/ezplus.directive.js b/js/ezplus.directive.js index 97dac70..e4f89f1 100644 --- a/js/ezplus.directive.js +++ b/js/ezplus.directive.js @@ -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) { @@ -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);