Skip to content

Commit

Permalink
Merge pull request #14 from akleiber/always-update-attrImageZoomSrc
Browse files Browse the repository at this point in the history
fixes #13 always update attrImageZoomSrc on ezpModel change
  • Loading branch information
igorlino authored Aug 24, 2016
2 parents 2a20057 + d7e42c5 commit b4089cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/angular-ezplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
}

initialUrl = getInitialUrl(options, smallUrl);
$element.data($scope.ezpOptions.attrImageZoomSrc || 'zoom-image', $scope.ezpModel.large || '');
plugin.swaptheimage(initialUrl, largeUrl);
showZoom();
} else {
Expand All @@ -142,7 +143,7 @@
$element.attr('src', initialUrl);
}

$element.attr('data-zoom-image', largeUrl);
$element.data($scope.ezpOptions.attrImageZoomSrc || 'zoom-image', $scope.ezpModel.large || '');

preparePlugin($element, options);
}
Expand Down

0 comments on commit b4089cd

Please sign in to comment.