Skip to content

Commit

Permalink
Removed the append-to attribute. Its available within the ezp-options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Lino committed Jun 7, 2015
1 parent a376f91 commit 5a31360
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions js/ezplus.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

link.$inject = ['$scope', '$element', '$attributes'];
function link($scope, $element, $attributes) {
$scope.appendto = typeof($attributes.appendto) !== 'undefined' ? $attributes.appendto : null;

$scope.$on("ezp-hidesAll", function (e, msg) {
var plugin = angular.element($element).data('ezPlus');
if (plugin) {
Expand Down Expand Up @@ -69,25 +67,16 @@
$element.attr('src', thumbMediumUrl);
$element.attr('data-zoom-image', fullSizeUrl);
var options = {
/*scrollZoom: true,
zoomWindowWidth: 600,
zoomWindowHeight: 600,
easing: true,
zoomWindowFadeIn: 500,
zoomWindowFadeOut: 500,
lensFadeIn: 500,
lensFadeOut: 500*/
};
if ($scope.appendto) {
options.zoomContainerAppendTo = $scope.appendto;
}

//generic way that sets all (non-function) parameters of colorbox.
//generic way that sets all (non-function) parameters of elevate zoom plus.
if ($scope.ezpOptions) {
//var cbOptionsFunc = $parse($attributes.options);
//var cbOptions = cbOptionsFunc($scope);
angular.extend(options, $scope.ezpOptions);
}
if (options.appendto) {
options.zoomContainerAppendTo = options.appendto;
}

angular.element($element).ezPlus(options);
}
}
Expand Down

0 comments on commit 5a31360

Please sign in to comment.