Skip to content

Commit

Permalink
new version 2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
thatisuday committed Mar 16, 2017
1 parent cff2500 commit 1650ae0
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 37 deletions.
2 changes: 1 addition & 1 deletion demo/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1><a href="https://github.com/thatisuday/ng-image-gallery" style="text-decorat
<br/>
<br/>

<ng-image-gallery images="images" methods="methods" conf="conf" thumbnails="thumbnails" inline="inline" bubbles="bubbles" img-bubbles="imgBubbles" bg-close="bgClose" on-open="opened();" on-close="closed();" bg-close="false"></ng-image-gallery>
<ng-image-gallery images="images" methods="methods" conf="conf" thumbnails="thumbnails" inline="inline" bubbles="bubbles" img-bubbles="imgBubbles" bg-close="bgClose" piracy="true" on-open="opened();" on-close="closed();" bg-close="false"></ng-image-gallery>

<script>
angular
Expand Down
40 changes: 28 additions & 12 deletions dist/ng-image-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
.module('thatisuday.ng-image-gallery', ['ngAnimate'])
.provider('ngImageGalleryOpts', function(){
var defOpts = {
thumbnails : true,
inline : false,
bubbles : true,
imgBubbles : false,
bgClose : false,
imgAnim : 'fadeup',
thumbnails : true,
inline : false,
bubbles : true,
imgBubbles : false,
bgClose : false,
piracy : false,
imgAnim : 'fadeup',
};

return{
Expand All @@ -30,6 +31,19 @@
}
}
})
.directive('ngRightClick', ['$parse', function($parse){
return {
scope : false,
link : function(scope, element, attrs){
element.bind('contextmenu', function(event){
if(scope.piracy == false){
event.preventDefault();
return scope.piracy;
}
});
}
};
}])
.directive('ngImageGallery', ['$rootScope', '$timeout', '$q', 'ngImageGalleryOpts',
function($rootScope, $timeout, $q, ngImageGalleryOpts){
return {
Expand All @@ -42,10 +56,11 @@
conf : '=?', // {}

thumbnails : '=?', // true|false
inline : '=?', // true|flase
bubbles : '=?', // true|flase
imgBubbles : '=?', // true|flase
bgClose : '=?', // true|flase
inline : '=?', // true|false
bubbles : '=?', // true|false
imgBubbles : '=?', // true|false
bgClose : '=?', // true|false
piracy : '=?', // true|false
imgAnim : '@?', // {name}

onOpen : '&?', // function
Expand Down Expand Up @@ -90,7 +105,7 @@

// Images container
'<div class="galleria-images img-anim-{{imgAnim}} img-move-dir-{{imgMoveDirection}}">'+
'<img class="galleria-image" ng-repeat="image in images track by $index" ng-if="activeImg == image" ng-src="{{image.url}}" ondragstart="return false;" oncontextmenu="return false;" ng-attr-title="{{image.title || undefined}}" ng-attr-alt="{{image.alt || undefined}}"/>'+
'<img class="galleria-image" ng-right-click ng-repeat="image in images track by $index" ng-if="activeImg == image" ng-src="{{image.url}}" ondragstart="return false;" ng-attr-title="{{image.title || undefined}}" ng-attr-alt="{{image.alt || undefined}}"/>'+
'</div>'+

// Bubble navigation container
Expand Down Expand Up @@ -207,6 +222,7 @@
scope.bubbles = (conf.bubbles != undefined) ? conf.bubbles : (scope.bubbles != undefined) ? scope.bubbles : ngImageGalleryOpts.bubbles;
scope.imgBubbles = (conf.imgBubbles != undefined) ? conf.imgBubbles : (scope.imgBubbles != undefined) ? scope.imgBubbles : ngImageGalleryOpts.imgBubbles;
scope.bgClose = (conf.bgClose != undefined) ? conf.bgClose : (scope.bgClose != undefined) ? scope.bgClose : ngImageGalleryOpts.bgClose;
scope.piracy = (conf.piracy != undefined) ? conf.piracy : (scope.piracy != undefined) ? scope.piracy : ngImageGalleryOpts.piracy;
scope.imgAnim = (conf.imgAnim != undefined) ? conf.imgAnim : (scope.imgAnim != undefined) ? scope.imgAnim : ngImageGalleryOpts.imgAnim;
});

Expand Down Expand Up @@ -394,7 +410,7 @@
};

$rootScope.$on('$stateChangeSuccess', removeClassFromDocumentBody);
$rootScope.$on('$routeChangeSuccess ', removeClassFromDocumentBody);
$rootScope.$on('$routeChangeSuccess', removeClassFromDocumentBody);

}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-image-gallery.min.css.map

Large diffs are not rendered by default.

Binary file modified dist/ng-image-gallery.min.css.map.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/ng-image-gallery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/ng-image-gallery.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/ng-image-gallery.min.js.map

Large diffs are not rendered by default.

Binary file modified dist/ng-image-gallery.min.js.map.gz
Binary file not shown.
11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-image-gallery",
"version": "v2.0.8",
"version": "v2.0.9",
"description": "Probably the best angular inline and modal image gallery combined...",
"main": "dist/ng-image-gallery.js",
"directories": {
Expand All @@ -20,7 +20,6 @@
},
"homepage": "https://github.com/thatisuday/ng-image-gallery#readme",
"devDependencies": {
"chai": "^3.5.0",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-concat": "^2.6.0",
Expand All @@ -29,12 +28,6 @@
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.4",
"karma": "^1.1.2",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.1.1",
"karma-phantomjs-launcher": "^1.0.1",
"mocha": "^3.0.0",
"phantomjs-prebuilt": "^2.1.9"
"gulp-uglify": "^1.5.4"
}
}
Loading

0 comments on commit 1650ae0

Please sign in to comment.