Skip to content

Commit

Permalink
Use showHideZoomContainer when closing/opening zoom.
Browse files Browse the repository at this point in the history
Update to latest EZP with new api.
Version bump.
  • Loading branch information
ceilino committed Jun 18, 2015
1 parent 5530c12 commit 9f6e4e1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ez-plus",
"version": "1.1.2",
"version": "1.1.3",
"author": {
"name": "Igor Lino",
"url": "http://igorlino.github.io/angular-elevatezoom-plus/"
Expand All @@ -27,7 +27,7 @@
"dependencies": {
"jquery": "~2.1.1",
"angular": "~1.3.4",
"ez-plus": "~1.1.5"
"ez-plus": "~1.1.6"
},
"devDependencies": {
},
Expand Down
40 changes: 24 additions & 16 deletions js/angular-ezplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,10 @@
}

$scope.$on("ezp-hidesAll", function (e, msg) {
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
plugin.showHideWindow('hide');
plugin.showHideTint('hide');
plugin.showHideLens('hide');
}
hideZoom();
});
$scope.$on("ezp-showAll", function (e, msg) {
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
plugin.showHideWindow('show');
plugin.showHideTint('show');
plugin.showHideLens('show');
}
showZoom();
});
$scope.$on("ezp-disableZoom", function (e, msg) {
var plugin = angular.element($element).data('ezPlus');
Expand All @@ -115,15 +105,14 @@
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
if (image) {
plugin.showHideWindow('hide');
plugin.showHideTint('hide');
plugin.showHideLens('hide');
hideZoom();
if (loader) {
plugin.swaptheimage(loader, loader);
}

var initialUrl = getInitialUrl(smallUrl);
plugin.swaptheimage(initialUrl, largeUrl);
showZoom();
} else {
plugin.closeAll();
}
Expand Down Expand Up @@ -158,7 +147,26 @@
$element.remove();
});


function hideZoom() {
var action='hide';
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
plugin.showHideZoomContainer(action);
plugin.showHideWindow(action);
plugin.showHideTint(action);
plugin.showHideLens(action);
}
}
function showZoom() {
var action='show';
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
plugin.showHideLens(action);
plugin.showHideTint(action);
plugin.showHideWindow(action);
plugin.showHideZoomContainer(action);
}
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ez-plus",
"version": "1.1.2",
"version": "1.1.3",
"title": "Angular EZ Plus",
"description": "Angular directive for ElevateZoom Plus.",
"keywords": [
Expand Down Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"jquery": ">=2.1.4",
"angular": "~1.3.4",
"ez-plus": "~1.1.5"
"ez-plus": "~1.1.6"
},
"devDependencies": {
"grunt": "^0.4.5",
Expand Down

0 comments on commit 9f6e4e1

Please sign in to comment.