diff --git a/dist/ng-image-gallery.css b/dist/ng-image-gallery.css index 2e7f4a8..4978bad 100644 --- a/dist/ng-image-gallery.css +++ b/dist/ng-image-gallery.css @@ -13,9 +13,12 @@ -webkit-transform: scaleY(1); } } .ng-image-gallery { + outline: none; /***************************************************************** INLINE GALLERY /*****************************************************************/ } + .ng-image-gallery * { + outline: none; } .ng-image-gallery .ng-image-gallery-thumbnails:after { content: ""; width: 0; @@ -88,7 +91,6 @@ background-repeat: no-repeat; overflow: hidden; cursor: pointer; - outline: none; text-decoration: none; color: #fff; vertical-align: bottom; } @@ -106,8 +108,7 @@ background-size: 100% 100%; background-repeat: no-repeat; overflow: hidden; - cursor: pointer; - outline: none; } + cursor: pointer; } .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev.bubbles-on, .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next.bubbles-on { top: calc((100% - 50px) / 2); } @@ -194,7 +195,6 @@ display: inline-block; margin: 0 2px; cursor: pointer; - outline: none; overflow: hidden; border-radius: 100%; background-size: cover; diff --git a/dist/ng-image-gallery.js b/dist/ng-image-gallery.js index 10ed131..b221b8f 100644 --- a/dist/ng-image-gallery.js +++ b/dist/ng-image-gallery.js @@ -154,17 +154,17 @@ **/ // Modify scope models - scope.images = (scope.images) ? scope.images : []; - scope.methods = (scope.methods) ? scope.methods : {}; + scope.images = (scope.images != undefined) ? scope.images : []; + scope.methods = (scope.methods != undefined) ? scope.methods : {}; - scope.thumbnails = (scope.thumbnails) ? scope.thumbnails : true; - scope.inline = (scope.inline) ? scope.inline : false; - scope.bubbles = (scope.bubbles) ? scope.bubbles : true; - scope.imgBubbles = (scope.imgBubbles) ? scope.imgBubbles : false; - scope.bgClose = (scope.bgClose) ? scope.bgClose : false; + scope.thumbnails = (scope.thumbnails != undefined) ? scope.thumbnails : true; + scope.inline = (scope.inline != undefined) ? scope.inline : false; + scope.bubbles = (scope.bubbles != undefined) ? scope.bubbles : true; + scope.imgBubbles = (scope.imgBubbles != undefined) ? scope.imgBubbles : false; + scope.bgClose = (scope.bgClose != undefined) ? scope.bgClose : false; - scope.onOpen = (scope.onOpen) ? scope.onOpen : angular.noop; - scope.onClose = (scope.onClose) ? scope.onClose : angular.noop; + scope.onOpen = (scope.onOpen != undefined) ? scope.onOpen : angular.noop; + scope.onClose = (scope.onClose != undefined) ? scope.onClose : angular.noop; // If images populate dynamically, reset gallery diff --git a/dist/ng-image-gallery.min.css b/dist/ng-image-gallery.min.css index b3b4839..9880aa4 100644 --- a/dist/ng-image-gallery.min.css +++ b/dist/ng-image-gallery.min.css @@ -1,2 +1,2 @@ -@-webkit-keyframes sk-stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes sk-stretchdelay{0%,100%,40%{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}.ng-image-gallery .ng-image-gallery-thumbnails:after{content:"";width:0;height:0;display:block;visibility:hidden;clear:both}.ng-image-gallery .ng-image-gallery-thumbnails .thumb{float:left;width:50px;height:50px;overflow:hidden;border-radius:3px;background-size:cover;background-position:center center;cursor:pointer}.ng-image-gallery .ng-image-gallery-thumbnails .thumb:not(:last-child){margin-right:5px;margin-bottom:5px}.ng-image-gallery .ng-image-gallery-modal{position:fixed;z-index:5000;top:0;right:0;bottom:0;left:0;overflow:hidden;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;backface-visibility:hidden;-webkit-backface-visibility:hidden}.ng-image-gallery .ng-image-gallery-modal.ng-hide-add{opacity:1}.ng-image-gallery .ng-image-gallery-modal.ng-hide-add-active,.ng-image-gallery .ng-image-gallery-modal.ng-hide-remove{opacity:0}.ng-image-gallery .ng-image-gallery-modal.ng-hide-remove-active{opacity:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-backdrop{background-color:rgba(0,0,0,.85);position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container{position:absolute;right:10px;top:20px;-webkit-transition:background-color .3s ease-in-out;transition:background-color .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container:hover{background-color:rgba(255,255,255,.1)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{display:inline-block;width:20px;height:20px;margin:5px;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden;cursor:pointer;outline:0;text-decoration:none;color:#fff;vertical-align:bottom}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{background-image:url(../res/icons/external-link.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close{background-image:url(../res/icons/close.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{position:absolute;top:50%;margin-top:-25px;width:50px;height:50px;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden;cursor:pointer;outline:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next.bubbles-on,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev.bubbles-on{top:calc((100% - 50px)/ 2)}@media screen and (max-width:600px){.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{margin-top:-15px;width:30px;height:30px}}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{left:0;background-image:url(../res/icons/prev.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next{right:0;background-image:url(../res/icons/next.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria{position:absolute;top:0;bottom:0;left:80px;right:80px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images{position:relative;-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;max-width:100%;max-height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;opacity:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter-active{opacity:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-leave-active{opacity:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles{-webkit-box-flex:0;-ms-flex:0 0 50px;flex:0 0 50px;text-align:center;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span{-webkit-box-flex:0;-ms-flex:none;flex:none;position:relative;display:inline-block;margin:0 2px;cursor:pointer;outline:0;overflow:hidden;border-radius:100%;background-size:cover;background-position:center center;vertical-align:middle}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble){width:16px;height:16px}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before{content:" ";display:block;width:10px;height:10px;background-color:rgba(255,255,255,.5);overflow:hidden;border-radius:100%;margin:3px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before{content:" ";width:16px;height:16px;background-color:rgba(255,255,255,.9);margin:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble{box-sizing:border-box;width:18px;height:18px;margin:0 4px;border:2px solid transparent;-webkit-transition:border .3s ease-in-out;transition:border .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active{border:2px solid #fff}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50px;height:50px;text-align:center;font-size:10px}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner>div{background-color:#fff;height:100%;width:7px;margin:0 3px 0 0;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.ng-image-gallery.inline .ng-image-gallery-modal{position:relative;z-index:1;overflow:hidden;width:100%;height:300px}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container{top:0}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{margin:0;background-image:url(../res/icons/external-link-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev{background-image:url(../res/icons/prev-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next{background-image:url(../res/icons/next-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev{margin-top:-15px;width:30px;height:30px}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before{background-color:rgba(0,0,0,.5)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before{background-color:rgba(0,0,0,.9)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active{border:2px solid #000}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-loader .spinner>div{background-color:#999} +@-webkit-keyframes sk-stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes sk-stretchdelay{0%,100%,40%{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}.ng-image-gallery,.ng-image-gallery *{outline:0}.ng-image-gallery .ng-image-gallery-thumbnails:after{content:"";width:0;height:0;display:block;visibility:hidden;clear:both}.ng-image-gallery .ng-image-gallery-thumbnails .thumb{float:left;width:50px;height:50px;overflow:hidden;border-radius:3px;background-size:cover;background-position:center center;cursor:pointer}.ng-image-gallery .ng-image-gallery-thumbnails .thumb:not(:last-child){margin-right:5px;margin-bottom:5px}.ng-image-gallery .ng-image-gallery-modal{position:fixed;z-index:5000;top:0;right:0;bottom:0;left:0;overflow:hidden;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;backface-visibility:hidden;-webkit-backface-visibility:hidden}.ng-image-gallery .ng-image-gallery-modal.ng-hide-add{opacity:1}.ng-image-gallery .ng-image-gallery-modal.ng-hide-add-active,.ng-image-gallery .ng-image-gallery-modal.ng-hide-remove{opacity:0}.ng-image-gallery .ng-image-gallery-modal.ng-hide-remove-active{opacity:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-backdrop{background-color:rgba(0,0,0,.85);position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container{position:absolute;right:10px;top:20px;-webkit-transition:background-color .3s ease-in-out;transition:background-color .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container:hover{background-color:rgba(255,255,255,.1)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{display:inline-block;width:20px;height:20px;margin:5px;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden;cursor:pointer;text-decoration:none;color:#fff;vertical-align:bottom}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{background-image:url(../res/icons/external-link.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close{background-image:url(../res/icons/close.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{position:absolute;top:50%;margin-top:-25px;width:50px;height:50px;background-size:100% 100%;background-repeat:no-repeat;overflow:hidden;cursor:pointer}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next.bubbles-on,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev.bubbles-on{top:calc((100% - 50px)/ 2)}@media screen and (max-width:600px){.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{margin-top:-15px;width:30px;height:30px}}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev{left:0;background-image:url(../res/icons/prev.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next{right:0;background-image:url(../res/icons/next.svg)}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria{position:absolute;top:0;bottom:0;left:80px;right:80px;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images{position:relative;-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;max-width:100%;max-height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter{-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;opacity:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter-active{opacity:1}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-leave-active{opacity:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles{-webkit-box-flex:0;-ms-flex:0 0 50px;flex:0 0 50px;text-align:center;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span{-webkit-box-flex:0;-ms-flex:none;flex:none;position:relative;display:inline-block;margin:0 2px;cursor:pointer;overflow:hidden;border-radius:100%;background-size:cover;background-position:center center;vertical-align:middle}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble){width:16px;height:16px}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before{content:" ";display:block;width:10px;height:10px;background-color:rgba(255,255,255,.5);overflow:hidden;border-radius:100%;margin:3px;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before{content:" ";width:16px;height:16px;background-color:rgba(255,255,255,.9);margin:0}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble{box-sizing:border-box;width:18px;height:18px;margin:0 4px;border:2px solid transparent;-webkit-transition:border .3s ease-in-out;transition:border .3s ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active{border:2px solid #fff}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner{-webkit-box-flex:0;-ms-flex:none;flex:none;width:50px;height:50px;text-align:center;font-size:10px}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner>div{background-color:#fff;height:100%;width:7px;margin:0 3px 0 0;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.ng-image-gallery.inline .ng-image-gallery-modal{position:relative;z-index:1;overflow:hidden;width:100%;height:300px}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container{top:0}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url{margin:0;background-image:url(../res/icons/external-link-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev{background-image:url(../res/icons/prev-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next{background-image:url(../res/icons/next-inline.svg)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next,.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev{margin-top:-15px;width:30px;height:30px}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before{background-color:rgba(0,0,0,.5)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before{background-color:rgba(0,0,0,.9)}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active{border:2px solid #000}.ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-loader .spinner>div{background-color:#999} /*# sourceMappingURL=ng-image-gallery.min.css.map */ diff --git a/dist/ng-image-gallery.min.css.gz b/dist/ng-image-gallery.min.css.gz index 32f1c61..aae8613 100644 Binary files a/dist/ng-image-gallery.min.css.gz and b/dist/ng-image-gallery.min.css.gz differ diff --git a/dist/ng-image-gallery.min.css.map b/dist/ng-image-gallery.min.css.map index a535732..3f95a5b 100644 --- a/dist/ng-image-gallery.min.css.map +++ b/dist/ng-image-gallery.min.css.map @@ -1 +1 @@ -{"version":3,"names":[],"mappings":"","sources":["ng-image-gallery.css"],"sourcesContent":["@-webkit-keyframes sk-stretchdelay {\n 0%, 40%, 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%, 40%, 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n\n.ng-image-gallery {\n /*****************************************************************\r\n\t\t\t\t\t\t\t\tINLINE GALLERY\r\n\t/*****************************************************************/ }\n .ng-image-gallery .ng-image-gallery-thumbnails:after {\n content: \"\";\n width: 0;\n height: 0;\n display: block;\n visibility: hidden;\n clear: both; }\n .ng-image-gallery .ng-image-gallery-thumbnails .thumb {\n float: left;\n width: 50px;\n height: 50px;\n overflow: hidden;\n border-radius: 3px;\n background-size: cover;\n background-position: center center;\n cursor: pointer; }\n .ng-image-gallery .ng-image-gallery-thumbnails .thumb:not(:last-child) {\n margin-right: 5px;\n margin-bottom: 5px; }\n .ng-image-gallery .ng-image-gallery-modal {\n position: fixed;\n z-index: 5000;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n -webkit-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-add {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-add-active {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-remove {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-remove-active {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-backdrop {\n background-color: rgba(0, 0, 0, 0.85);\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 2; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container {\n position: absolute;\n right: 10px;\n top: 20px;\n -webkit-transition: background-color 0.3s ease-in-out;\n transition: background-color 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container:hover {\n background-color: rgba(255, 255, 255, 0.1); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 5px;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: hidden;\n cursor: pointer;\n outline: none;\n text-decoration: none;\n color: #fff;\n vertical-align: bottom; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url {\n background-image: url(../res/icons/external-link.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close {\n background-image: url(../res/icons/close.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n position: absolute;\n top: 50%;\n margin-top: -25px;\n width: 50px;\n height: 50px;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: hidden;\n cursor: pointer;\n outline: none; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev.bubbles-on,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next.bubbles-on {\n top: calc((100% - 50px) / 2); }\n @media screen and (max-width: 600px) {\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n margin-top: -15px;\n width: 30px;\n height: 30px; } }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev {\n left: 0px;\n background-image: url(../res/icons/prev.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n right: 0px;\n background-image: url(../res/icons/next.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 80px;\n right: 80px;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 100%; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n margin: auto;\n max-width: 100%;\n max-height: 100%;\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter {\n -webkit-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter-active {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-leave-active {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 50px;\n flex: 0 0 50px;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span {\n -webkit-box-flex: 0;\n -ms-flex: none;\n flex: none;\n position: relative;\n display: inline-block;\n margin: 0 2px;\n cursor: pointer;\n outline: none;\n overflow: hidden;\n border-radius: 100%;\n background-size: cover;\n background-position: center center;\n vertical-align: middle; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble) {\n width: 16px;\n height: 16px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before {\n content: \" \";\n display: block;\n width: 10px;\n height: 10px;\n background-color: rgba(255, 255, 255, 0.5);\n overflow: hidden;\n border-radius: 100%;\n margin: 3px;\n -webkit-transition: all 0.3s ease-in-out;\n transition: all 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before {\n content: \" \";\n width: 16px;\n height: 16px;\n background-color: rgba(255, 255, 255, 0.9);\n margin: 0px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble {\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n margin: 0 4px;\n border: 2px solid transparent;\n -webkit-transition: border 0.3s ease-in-out;\n transition: border 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active {\n border: 2px solid #fff; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner {\n -webkit-box-flex: 0;\n -ms-flex: none;\n flex: none;\n width: 50px;\n height: 50px;\n text-align: center;\n font-size: 10px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner > div {\n background-color: #fff;\n height: 100%;\n width: 7px;\n margin: 0 3px 0 0;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n .ng-image-gallery.inline .ng-image-gallery-modal {\n position: relative;\n z-index: 1;\n overflow: hidden;\n width: 100%;\n height: 300px; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container {\n top: 0; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url {\n margin: 0;\n background-image: url(../res/icons/external-link-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev {\n background-image: url(../res/icons/prev-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next {\n background-image: url(../res/icons/next-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev, .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next {\n margin-top: -15px;\n width: 30px;\n height: 30px; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before {\n background-color: rgba(0, 0, 0, 0.5); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before {\n background-color: rgba(0, 0, 0, 0.9); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active {\n border: 2px solid #000; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-loader .spinner > div {\n background-color: #999; }\n"],"file":"ng-image-gallery.min.css","sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"names":[],"mappings":"","sources":["ng-image-gallery.css"],"sourcesContent":["@-webkit-keyframes sk-stretchdelay {\n 0%, 40%, 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%, 40%, 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n\n.ng-image-gallery {\n outline: none;\n /*****************************************************************\r\n\t\t\t\t\t\t\t\tINLINE GALLERY\r\n\t/*****************************************************************/ }\n .ng-image-gallery * {\n outline: none; }\n .ng-image-gallery .ng-image-gallery-thumbnails:after {\n content: \"\";\n width: 0;\n height: 0;\n display: block;\n visibility: hidden;\n clear: both; }\n .ng-image-gallery .ng-image-gallery-thumbnails .thumb {\n float: left;\n width: 50px;\n height: 50px;\n overflow: hidden;\n border-radius: 3px;\n background-size: cover;\n background-position: center center;\n cursor: pointer; }\n .ng-image-gallery .ng-image-gallery-thumbnails .thumb:not(:last-child) {\n margin-right: 5px;\n margin-bottom: 5px; }\n .ng-image-gallery .ng-image-gallery-modal {\n position: fixed;\n z-index: 5000;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n -webkit-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-add {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-add-active {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-remove {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal.ng-hide-remove-active {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-backdrop {\n background-color: rgba(0, 0, 0, 0.85);\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 2; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container {\n position: absolute;\n right: 10px;\n top: 20px;\n -webkit-transition: background-color 0.3s ease-in-out;\n transition: background-color 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container:hover {\n background-color: rgba(255, 255, 255, 0.1); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 5px;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: hidden;\n cursor: pointer;\n text-decoration: none;\n color: #fff;\n vertical-align: bottom; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url {\n background-image: url(../res/icons/external-link.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .close {\n background-image: url(../res/icons/close.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n position: absolute;\n top: 50%;\n margin-top: -25px;\n width: 50px;\n height: 50px;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n overflow: hidden;\n cursor: pointer; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev.bubbles-on,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next.bubbles-on {\n top: calc((100% - 50px) / 2); }\n @media screen and (max-width: 600px) {\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev,\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n margin-top: -15px;\n width: 30px;\n height: 30px; } }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .prev {\n left: 0px;\n background-image: url(../res/icons/prev.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .next {\n right: 0px;\n background-image: url(../res/icons/next.svg); }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 80px;\n right: 80px;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images {\n position: relative;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 100%; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n margin: auto;\n max-width: 100%;\n max-height: 100%;\n backface-visibility: hidden;\n -webkit-backface-visibility: hidden;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter {\n -webkit-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-enter-active {\n opacity: 1; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-images .galleria-image.ng-leave-active {\n opacity: 0; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 50px;\n flex: 0 0 50px;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span {\n -webkit-box-flex: 0;\n -ms-flex: none;\n flex: none;\n position: relative;\n display: inline-block;\n margin: 0 2px;\n cursor: pointer;\n overflow: hidden;\n border-radius: 100%;\n background-size: cover;\n background-position: center center;\n vertical-align: middle; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble) {\n width: 16px;\n height: 16px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before {\n content: \" \";\n display: block;\n width: 10px;\n height: 10px;\n background-color: rgba(255, 255, 255, 0.5);\n overflow: hidden;\n border-radius: 100%;\n margin: 3px;\n -webkit-transition: all 0.3s ease-in-out;\n transition: all 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before {\n content: \" \";\n width: 16px;\n height: 16px;\n background-color: rgba(255, 255, 255, 0.9);\n margin: 0px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble {\n box-sizing: border-box;\n width: 18px;\n height: 18px;\n margin: 0 4px;\n border: 2px solid transparent;\n -webkit-transition: border 0.3s ease-in-out;\n transition: border 0.3s ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active {\n border: 2px solid #fff; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner {\n -webkit-box-flex: 0;\n -ms-flex: none;\n flex: none;\n width: 50px;\n height: 50px;\n text-align: center;\n font-size: 10px; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner > div {\n background-color: #fff;\n height: 100%;\n width: 7px;\n margin: 0 3px 0 0;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .ng-image-gallery .ng-image-gallery-modal .ng-image-gallery-loader .spinner .rect5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n .ng-image-gallery.inline .ng-image-gallery-modal {\n position: relative;\n z-index: 1;\n overflow: hidden;\n width: 100%;\n height: 300px; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container {\n top: 0; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .destroy-icons-container .ext-url {\n margin: 0;\n background-image: url(../res/icons/external-link-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev {\n background-image: url(../res/icons/prev-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next {\n background-image: url(../res/icons/next-inline.svg); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .prev, .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .next {\n margin-top: -15px;\n width: 30px;\n height: 30px; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble):before {\n background-color: rgba(0, 0, 0, 0.5); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span:not(.img-bubble).active:before {\n background-color: rgba(0, 0, 0, 0.9); }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-content .galleria .galleria-bubbles span.img-bubble.active {\n border: 2px solid #000; }\n .ng-image-gallery.inline .ng-image-gallery-modal .ng-image-gallery-loader .spinner > div {\n background-color: #999; }\n"],"file":"ng-image-gallery.min.css","sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ng-image-gallery.min.css.map.gz b/dist/ng-image-gallery.min.css.map.gz index d63f885..b09f0b0 100644 Binary files a/dist/ng-image-gallery.min.css.map.gz and b/dist/ng-image-gallery.min.css.map.gz differ diff --git a/dist/ng-image-gallery.min.js b/dist/ng-image-gallery.min.js index baf4555..bc2e676 100644 --- a/dist/ng-image-gallery.min.js +++ b/dist/ng-image-gallery.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";var e={enter:13,esc:27,left:37,right:39};angular.module("thatisuday.ng-image-gallery",["ngAnimate"]).directive("ngImageGallery",["$timeout","$document","$q",function(i,n,a){return{replace:!0,transclude:!1,restrict:"AE",scope:{images:"=",methods:"=?",thumbnails:"=?",inline:"=?",bubbles:"=?",imgBubbles:"=?",bgClose:"=?",onOpen:"&?",onClose:"&?"},template:'',link:function(s,l,g){s.showLoader=function(){s.imgLoading=!0},s.hideLoader=function(){s.imgLoading=!1},s.loadImg=function(e){var i=a.defer();e.hasOwnProperty("cached")||s.showLoader();var n=new Image;return n.src=e.url,n.onload=function(){return e.hasOwnProperty("cached")||s.hideLoader(),e.hasOwnProperty("cached")||(e.cached=!0),i.resolve(e)},i.promise},s.setActiveImg=function(e){s.loadImg(e).then(function(e){s.activeImg=e})},s.images=s.images?s.images:[],s.methods=s.methods?s.methods:{},s.thumbnails=!s.thumbnails||s.thumbnails,s.inline=!!s.inline&&s.inline,s.bubbles=!s.bubbles||s.bubbles,s.imgBubbles=!!s.imgBubbles&&s.imgBubbles,s.bgClose=!!s.bgClose&&s.bgClose,s.onOpen=s.onOpen?s.onOpen:angular.noop,s.onClose=s.onClose?s.onClose:angular.noop;var t=!0;s.$watch("images",function(){t?t=!1:s.images.length&&s.setActiveImg(s.images[s.activeImageIndex||0])});var c=!0;if(s.$watch("activeImageIndex",function(e){c?c=!1:s.images.length&&s.setActiveImg(s.images[e])}),s.$watch("inline",function(){i(function(){s.inline&&s.methods.open()})}),s.methods.open=function(e){s.activeImageIndex=e?e:0,s.opened=!0,i(function(){s.onOpen()},300)},s.methods.close=function(){s.opened=!1,i(function(){s.onClose(),s.activeImageIndex=0},300)},s.methods.next=function(){s.activeImageIndex==s.images.length-1?s.activeImageIndex=0:s.activeImageIndex=s.activeImageIndex+1},s.methods.prev=function(){0==s.activeImageIndex?s.activeImageIndex=s.images.length-1:s.activeImageIndex--},s.backgroundClose=function(e){if(s.bgClose&&!s.inline)for(var i=["galleria-image","destroy-icons-container","ext-url","close","next","prev","galleria-bubble"],n=0;n',link:function(s,l,g){s.showLoader=function(){s.imgLoading=!0},s.hideLoader=function(){s.imgLoading=!1},s.loadImg=function(e){var i=a.defer();e.hasOwnProperty("cached")||s.showLoader();var n=new Image;return n.src=e.url,n.onload=function(){return e.hasOwnProperty("cached")||s.hideLoader(),e.hasOwnProperty("cached")||(e.cached=!0),i.resolve(e)},i.promise},s.setActiveImg=function(e){s.loadImg(e).then(function(e){s.activeImg=e})},s.images=void 0!=s.images?s.images:[],s.methods=void 0!=s.methods?s.methods:{},s.thumbnails=void 0==s.thumbnails||s.thumbnails,s.inline=void 0!=s.inline&&s.inline,s.bubbles=void 0==s.bubbles||s.bubbles,s.imgBubbles=void 0!=s.imgBubbles&&s.imgBubbles,s.bgClose=void 0!=s.bgClose&&s.bgClose,s.onOpen=void 0!=s.onOpen?s.onOpen:angular.noop,s.onClose=void 0!=s.onClose?s.onClose:angular.noop;var t=!0;s.$watch("images",function(){t?t=!1:s.images.length&&s.setActiveImg(s.images[s.activeImageIndex||0])});var o=!0;if(s.$watch("activeImageIndex",function(e){o?o=!1:s.images.length&&s.setActiveImg(s.images[e])}),s.$watch("inline",function(){i(function(){s.inline&&s.methods.open()})}),s.methods.open=function(e){s.activeImageIndex=e?e:0,s.opened=!0,i(function(){s.onOpen()},300)},s.methods.close=function(){s.opened=!1,i(function(){s.onClose(),s.activeImageIndex=0},300)},s.methods.next=function(){s.activeImageIndex==s.images.length-1?s.activeImageIndex=0:s.activeImageIndex=s.activeImageIndex+1},s.methods.prev=function(){0==s.activeImageIndex?s.activeImageIndex=s.images.length-1:s.activeImageIndex--},s.backgroundClose=function(e){if(s.bgClose&&!s.inline)for(var i=["galleria-image","destroy-icons-container","ext-url","close","next","prev","galleria-bubble"],n=0;n'+\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Thumbnails container\r\n\t\t\t\t\t\t\t// Hide for inline gallery\r\n\t\t\t\t\t\t\t''+\r\n\r\n\t\t\t\t\t\t\t// Modal container\r\n\t\t\t\t\t\t\t// (inline container for inline modal)\r\n\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t'',\r\n\t\t\t\t\t\t\r\n\t\t\tlink : function(scope, elem, attr){\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t *\tOperational functions\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Show gallery loader\r\n\t\t\t\tscope.showLoader = function(){\r\n\t\t\t\t\tscope.imgLoading = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Hide gallery loader\r\n\t\t\t\tscope.hideLoader = function(){\r\n\t\t\t\t\tscope.imgLoading = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Image load complete promise\r\n\t\t\t\tscope.loadImg = function(imgObj){\r\n\t\t\t\t\tvar deferred = $q.defer();\r\n\r\n\t\t\t\t\t// Show loder\r\n\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) scope.showLoader();\r\n\r\n\t\t\t\t\t// Process image\r\n\t\t\t\t\tvar img = new Image();\r\n\t\t\t\t\timg.src = imgObj.url;\r\n\t\t\t\t\timg.onload = function(){\r\n\t\t\t\t\t\t// Hide loder\r\n\t\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) scope.hideLoader();\r\n\r\n\t\t\t\t\t\t// Cache image\r\n\t\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) imgObj.cached = true;\r\n\r\n\t\t\t\t\t\treturn deferred.resolve(imgObj);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn deferred.promise;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscope.setActiveImg = function(imgObj){\r\n\t\t\t\t\t// Load image\r\n\t\t\t\t\tscope.loadImg(imgObj).then(function(imgObj){\r\n\t\t\t\t\t\tscope.activeImg = imgObj;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t/***************************************************/\r\n\t\t\t\t\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tGallery settings\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Modify scope models\r\n\t\t\t\tscope.images \t \t = \t(scope.images) \t\t ? scope.images \t\t: \t[];\r\n\t\t\t\tscope.methods \t \t = \t(scope.methods) \t ? scope.methods \t\t: \t{};\r\n\r\n\t\t\t\tscope.thumbnails \t = \t(scope.thumbnails) \t ? scope.thumbnails \t: \ttrue;\r\n\t\t\t\tscope.inline \t \t = \t(scope.inline) \t\t ? scope.inline \t\t: \tfalse;\r\n\t\t\t\tscope.bubbles \t \t = \t(scope.bubbles) \t ? scope.bubbles \t\t: \ttrue;\r\n\t\t\t\tscope.imgBubbles \t = \t(scope.imgBubbles) \t ? scope.imgBubbles \t: \tfalse;\r\n\t\t\t\tscope.bgClose \t \t = \t(scope.bgClose) \t ? scope.bgClose \t\t: \tfalse;\r\n\r\n\t\t\t\tscope.onOpen \t \t = \t(scope.onOpen) \t\t ? scope.onOpen \t\t: \tangular.noop;\r\n\t\t\t\tscope.onClose \t \t = \t(scope.onClose) \t ? scope.onClose \t\t: \tangular.noop;\r\n\r\n\r\n\t\t\t\t// If images populate dynamically, reset gallery\r\n\t\t\t\tvar imagesFirstWatch = true;\r\n\t\t\t\tscope.$watch('images', function(){\r\n\t\t\t\t\tif(imagesFirstWatch){\r\n\t\t\t\t\t\timagesFirstWatch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scope.images.length) scope.setActiveImg(\r\n\t\t\t\t\t\tscope.images[scope.activeImageIndex || 0]\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Watch index of visible/active image\r\n\t\t\t\t// If index changes, make sure to load/change image\r\n\t\t\t\tvar activeImageIndexFirstWatch = true;\r\n\t\t\t\tscope.$watch('activeImageIndex', function(newImgIndex){\r\n\t\t\t\t\tif(activeImageIndexFirstWatch){\r\n\t\t\t\t\t\tactiveImageIndexFirstWatch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scope.images.length){\r\n\t\t\t\t\t\tscope.setActiveImg(\r\n\t\t\t\t\t\t\tscope.images[newImgIndex]\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Open modal automatically if inline\r\n\t\t\t\tscope.$watch('inline', function(){\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tif(scope.inline) scope.methods.open();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\r\n\t\t\t\t/***************************************************/\r\n\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tMethods\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Open gallery modal\r\n\t\t\t\tscope.methods.open = function(imgIndex){\r\n\t\t\t\t\t// Open modal from an index if one passed\r\n\t\t\t\t\tscope.activeImageIndex = (imgIndex) ? imgIndex : 0;\r\n\r\n\t\t\t\t\tscope.opened = true; \r\n\r\n\t\t\t\t\t// call open event after transition\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tscope.onOpen();\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t// Close gallery modal\r\n\t\t\t\tscope.methods.close = function(){\r\n\t\t\t\t\tscope.opened = false; // Model closed\r\n\r\n\t\t\t\t\t// call close event after transition\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tscope.onClose();\r\n\t\t\t\t\t\tscope.activeImageIndex = 0; // Reset index\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Change image to next\r\n\t\t\t\tscope.methods.next = function(){\r\n\t\t\t\t\tif(scope.activeImageIndex == (scope.images.length - 1)){\r\n\t\t\t\t\t\tscope.activeImageIndex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tscope.activeImageIndex = scope.activeImageIndex + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Change image to prev\r\n\t\t\t\tscope.methods.prev = function(){\r\n\t\t\t\t\tif(scope.activeImageIndex == 0){\r\n\t\t\t\t\t\tscope.activeImageIndex = scope.images.length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tscope.activeImageIndex--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t// Close gallery on background click\r\n\t\t\t\tscope.backgroundClose = function(e){\r\n\t\t\t\t\tif(!scope.bgClose || scope.inline) return;\r\n\r\n\t\t\t\t\tvar noCloseClasses = [\r\n\t\t\t\t\t\t'galleria-image',\r\n\t\t\t\t\t\t'destroy-icons-container',\r\n\t\t\t\t\t\t'ext-url',\r\n\t\t\t\t\t\t'close',\r\n\t\t\t\t\t\t'next',\r\n\t\t\t\t\t\t'prev',\r\n\t\t\t\t\t\t'galleria-bubble'\r\n\t\t\t\t\t];\r\n\r\n\t\t\t\t\t// check if clicked element has a class that\r\n\t\t\t\t\t// belongs to `noCloseClasses`\r\n\t\t\t\t\tfor(var i = 0; i < e.target.classList.length; i++){\r\n\t\t\t\t\t\tif(noCloseClasses.indexOf(e.target.classList[i]) != -1){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t/***************************************************/\r\n\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tUser interactions\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Key events\r\n\t\t\t\t$document.bind('keyup', function(event){\r\n\t\t\t\t\t// If inline modal, do not interact\r\n\t\t\t\t\tif(scope.inline) return;\r\n\r\n\t\t\t\t\tif(event.which == keys.right || event.which == keys.enter){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.next();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(event.which == keys.left){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.prev();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(event.which == keys.esc){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Swipe events\r\n\t\t\t\tif(window.Hammer){\r\n\t\t\t\t\tvar hammerElem = new Hammer(elem[0]);\r\n\t\t\t\t\thammerElem.on('swiperight', function(ev){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.prev();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\thammerElem.on('swipeleft', function(ev){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.next();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\thammerElem.on('doubletap', function(ev){\r\n\t\t\t\t\t\tif(scope.inline) return;\r\n\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}]);\r\n })();"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["ng-image-gallery.min.js"],"names":["keys","enter","esc","left","right","angular","module","directive","$timeout","$document","$q","replace","transclude","restrict","scope","images","methods","thumbnails","inline","bubbles","imgBubbles","bgClose","onOpen","onClose","template","link","elem","attr","showLoader","imgLoading","hideLoader","loadImg","imgObj","deferred","defer","hasOwnProperty","img","Image","src","url","onload","cached","resolve","promise","setActiveImg","then","activeImg","undefined","noop","imagesFirstWatch","$watch","length","activeImageIndex","activeImageIndexFirstWatch","newImgIndex","open","imgIndex","opened","close","next","prev","backgroundClose","e","noCloseClasses","i","target","classList","indexOf","bind","event","which","window","Hammer","hammerElem","on","ev"],"mappings":"CAAC,WACA,YAGA,IAAIA,IACHC,MAAQ,GACRC,IAAQ,GACRC,KAAQ,GACRC,MAAQ,GAGTC,SACCC,OAAO,+BAAgC,cACvCC,UAAU,kBAAmB,WAAY,YAAa,KAAM,SAASC,EAAUC,EAAWC,GAC1F,OACCC,SAAU,EACVC,YAAa,EACbC,SAAW,KACXC,OACCC,OAAa,IACbC,QAAa,KAEbC,WAAgB,KAChBC,OAAa,KACbC,QAAa,KACbC,WAAgB,KAChBC,QAAa,KAEbC,OAAa,KACbC,QAAa,MAEdC,SAAY,08DAsEZC,KAAO,SAASX,EAAOY,EAAMC,GAO5Bb,EAAMc,WAAa,WAClBd,EAAMe,YAAa,GAIpBf,EAAMgB,WAAa,WAClBhB,EAAMe,YAAa,GAIpBf,EAAMiB,QAAU,SAASC,GACxB,GAAIC,GAAYvB,EAAGwB,OAGfF,GAAOG,eAAe,WAAWrB,EAAMc,YAG3C,IAAIQ,GAAM,GAAIC,MAYd,OAXAD,GAAIE,IAAMN,EAAOO,IACjBH,EAAII,OAAS,WAOZ,MALIR,GAAOG,eAAe,WAAWrB,EAAMgB,aAGvCE,EAAOG,eAAe,YAAWH,EAAOS,QAAS,GAE9CR,EAASS,QAAQV,IAGlBC,EAASU,SAGjB7B,EAAM8B,aAAe,SAASZ,GAE7BlB,EAAMiB,QAAQC,GAAQa,KAAK,SAASb,GACnClB,EAAMgC,UAAYd,KAapBlB,EAAMC,OAAiCgC,QAAlBjC,EAAMC,OAAyBD,EAAMC,UAC1DD,EAAME,QAAmC+B,QAAnBjC,EAAME,QAA0BF,EAAME,WAE5DF,EAAMG,WAAsC8B,QAArBjC,EAAMG,YAA4BH,EAAMG,WAC/DH,EAAMI,OAAiC6B,QAAlBjC,EAAMI,QAAyBJ,EAAMI,OAC1DJ,EAAMK,QAAmC4B,QAAnBjC,EAAMK,SAA0BL,EAAMK,QAC5DL,EAAMM,WAAsC2B,QAArBjC,EAAMM,YAA4BN,EAAMM,WAC/DN,EAAMO,QAAmC0B,QAAnBjC,EAAMO,SAA0BP,EAAMO,QAE5DP,EAAMQ,OAAiCyB,QAAlBjC,EAAMQ,OAAyBR,EAAMQ,OAAWjB,QAAQ2C,KAC7ElC,EAAMS,QAAmCwB,QAAnBjC,EAAMS,QAA0BT,EAAMS,QAAYlB,QAAQ2C,IAIhF,IAAIC,IAAmB,CACvBnC,GAAMoC,OAAO,SAAU,WACnBD,EACFA,GAAmB,EAEZnC,EAAMC,OAAOoC,QAAQrC,EAAM8B,aAClC9B,EAAMC,OAAOD,EAAMsC,kBAAoB,KAMzC,IAAIC,IAA6B,CAkIjC,IAjIAvC,EAAMoC,OAAO,mBAAoB,SAASI,GACtCD,EACFA,GAA6B,EAEtBvC,EAAMC,OAAOoC,QACpBrC,EAAM8B,aACL9B,EAAMC,OAAOuC,MAMhBxC,EAAMoC,OAAO,SAAU,WACtB1C,EAAS,WACLM,EAAMI,QAAQJ,EAAME,QAAQuC,WAajCzC,EAAME,QAAQuC,KAAO,SAASC,GAE7B1C,EAAMsC,iBAAmB,EAAaI,EAAW,EAEjD1C,EAAM2C,QAAS,EAGfjD,EAAS,WACRM,EAAMQ,UACJ,MAKJR,EAAME,QAAQ0C,MAAQ,WACrB5C,EAAM2C,QAAS,EAGfjD,EAAS,WACRM,EAAMS,UACNT,EAAMsC,iBAAmB,GACvB,MAIJtC,EAAME,QAAQ2C,KAAO,WACjB7C,EAAMsC,kBAAqBtC,EAAMC,OAAOoC,OAAS,EACnDrC,EAAMsC,iBAAmB,EAGzBtC,EAAMsC,iBAAmBtC,EAAMsC,iBAAmB,GAKpDtC,EAAME,QAAQ4C,KAAO,WACS,GAA1B9C,EAAMsC,iBACRtC,EAAMsC,iBAAmBtC,EAAMC,OAAOoC,OAAS,EAG/CrC,EAAMsC,oBAMRtC,EAAM+C,gBAAkB,SAASC,GAChC,GAAIhD,EAAMO,UAAWP,EAAMI,OAc3B,IAAI,GAZA6C,IACH,iBACA,0BACA,UACA,QACA,OACA,OACA,mBAKOC,EAAI,EAAGA,EAAIF,EAAEG,OAAOC,UAAUf,QAClCY,EAAeI,QAAQL,EAAEG,OAAOC,UAAUF,QADAA,IAK5ClD,EAAME,QAAQ0C,SAcjBjD,EAAU2D,KAAK,QAAS,SAASC,GAE7BvD,EAAMI,SAENmD,EAAMC,OAAStE,EAAKI,OAASiE,EAAMC,OAAStE,EAAKC,MACnDO,EAAS,WACRM,EAAME,QAAQ2C,SAGRU,EAAMC,OAAStE,EAAKG,KAC3BK,EAAS,WACRM,EAAME,QAAQ4C,SAGRS,EAAMC,OAAStE,EAAKE,KAC3BM,EAAS,WACRM,EAAME,QAAQ0C,aAMda,OAAOC,OAAO,CAChB,GAAIC,GAAa,GAAID,QAAO9C,EAAK,GACjC+C,GAAWC,GAAG,aAAc,SAASC,GACpCnE,EAAS,WACRM,EAAME,QAAQ4C,WAGhBa,EAAWC,GAAG,YAAa,SAASC,GACnCnE,EAAS,WACRM,EAAME,QAAQ2C,WAGhBc,EAAWC,GAAG,YAAa,SAASC,GAChC7D,EAAMI,QAETV,EAAS,WACRM,EAAME,QAAQ0C","file":"ng-image-gallery.min.js","sourcesContent":[" (function(){\r\n\t'use strict';\r\n\t\r\n\t// Key codes\r\n\tvar keys = {\r\n\t\tenter : 13,\r\n\t\tesc : 27,\r\n\t\tleft : 37,\r\n\t\tright : 39\r\n\t};\r\n\r\n\tangular\r\n\t.module('thatisuday.ng-image-gallery', ['ngAnimate'])\r\n\t.directive('ngImageGallery', ['$timeout', '$document', '$q', function($timeout, $document, $q){\r\n\t\treturn {\r\n\t\t\treplace : true,\r\n\t\t\ttransclude : false,\r\n\t\t\trestrict : 'AE',\r\n\t\t\tscope : {\r\n\t\t\t\timages \t\t\t: \t'=',\t\t// []\r\n\t\t\t\tmethods \t\t: \t'=?',\t\t// {}\r\n\r\n\t\t\t\tthumbnails \t\t: \t'=?',\t\t// true|false\r\n\t\t\t\tinline \t\t\t: \t'=?',\t\t// true|flase\r\n\t\t\t\tbubbles \t\t: \t'=?',\t\t// true|flase\r\n\t\t\t\timgBubbles \t\t: \t'=?',\t\t// true|flase\r\n\t\t\t\tbgClose \t\t: \t'=?',\t\t// true|flase\r\n\r\n\t\t\t\tonOpen \t\t\t: \t'&?',\t\t// function\r\n\t\t\t\tonClose \t\t: \t'&?'\t\t// function\r\n\t\t\t},\r\n\t\t\ttemplate : \t'
'+\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Thumbnails container\r\n\t\t\t\t\t\t\t// Hide for inline gallery\r\n\t\t\t\t\t\t\t''+\r\n\r\n\t\t\t\t\t\t\t// Modal container\r\n\t\t\t\t\t\t\t// (inline container for inline modal)\r\n\t\t\t\t\t\t\t''+\r\n\t\t\t\t\t\t'
',\r\n\t\t\t\t\t\t\r\n\t\t\tlink : function(scope, elem, attr){\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t *\tOperational functions\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Show gallery loader\r\n\t\t\t\tscope.showLoader = function(){\r\n\t\t\t\t\tscope.imgLoading = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Hide gallery loader\r\n\t\t\t\tscope.hideLoader = function(){\r\n\t\t\t\t\tscope.imgLoading = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Image load complete promise\r\n\t\t\t\tscope.loadImg = function(imgObj){\r\n\t\t\t\t\tvar deferred = $q.defer();\r\n\r\n\t\t\t\t\t// Show loder\r\n\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) scope.showLoader();\r\n\r\n\t\t\t\t\t// Process image\r\n\t\t\t\t\tvar img = new Image();\r\n\t\t\t\t\timg.src = imgObj.url;\r\n\t\t\t\t\timg.onload = function(){\r\n\t\t\t\t\t\t// Hide loder\r\n\t\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) scope.hideLoader();\r\n\r\n\t\t\t\t\t\t// Cache image\r\n\t\t\t\t\t\tif(!imgObj.hasOwnProperty('cached')) imgObj.cached = true;\r\n\r\n\t\t\t\t\t\treturn deferred.resolve(imgObj);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn deferred.promise;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscope.setActiveImg = function(imgObj){\r\n\t\t\t\t\t// Load image\r\n\t\t\t\t\tscope.loadImg(imgObj).then(function(imgObj){\r\n\t\t\t\t\t\tscope.activeImg = imgObj;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t/***************************************************/\r\n\t\t\t\t\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tGallery settings\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Modify scope models\r\n\t\t\t\tscope.images \t \t = \t(scope.images \t\t!= undefined) ? scope.images \t: \t[];\r\n\t\t\t\tscope.methods \t \t = \t(scope.methods \t\t!= undefined) ? scope.methods \t: \t{};\r\n\r\n\t\t\t\tscope.thumbnails \t = \t(scope.thumbnails \t!= undefined) ? scope.thumbnails : \ttrue;\r\n\t\t\t\tscope.inline \t \t = \t(scope.inline \t\t!= undefined) ? scope.inline \t: \tfalse;\r\n\t\t\t\tscope.bubbles \t \t = \t(scope.bubbles \t\t!= undefined) ? scope.bubbles \t: \ttrue;\r\n\t\t\t\tscope.imgBubbles \t = \t(scope.imgBubbles \t!= undefined) ? scope.imgBubbles : \tfalse;\r\n\t\t\t\tscope.bgClose \t \t = \t(scope.bgClose \t\t!= undefined) ? scope.bgClose \t: \tfalse;\r\n\r\n\t\t\t\tscope.onOpen \t \t = \t(scope.onOpen \t\t!= undefined) ? scope.onOpen \t: \tangular.noop;\r\n\t\t\t\tscope.onClose \t \t = \t(scope.onClose \t\t!= undefined) ? scope.onClose \t: \tangular.noop;\r\n\r\n\r\n\t\t\t\t// If images populate dynamically, reset gallery\r\n\t\t\t\tvar imagesFirstWatch = true;\r\n\t\t\t\tscope.$watch('images', function(){\r\n\t\t\t\t\tif(imagesFirstWatch){\r\n\t\t\t\t\t\timagesFirstWatch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scope.images.length) scope.setActiveImg(\r\n\t\t\t\t\t\tscope.images[scope.activeImageIndex || 0]\r\n\t\t\t\t\t);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Watch index of visible/active image\r\n\t\t\t\t// If index changes, make sure to load/change image\r\n\t\t\t\tvar activeImageIndexFirstWatch = true;\r\n\t\t\t\tscope.$watch('activeImageIndex', function(newImgIndex){\r\n\t\t\t\t\tif(activeImageIndexFirstWatch){\r\n\t\t\t\t\t\tactiveImageIndexFirstWatch = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(scope.images.length){\r\n\t\t\t\t\t\tscope.setActiveImg(\r\n\t\t\t\t\t\t\tscope.images[newImgIndex]\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Open modal automatically if inline\r\n\t\t\t\tscope.$watch('inline', function(){\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tif(scope.inline) scope.methods.open();\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\r\n\t\t\t\t/***************************************************/\r\n\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tMethods\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Open gallery modal\r\n\t\t\t\tscope.methods.open = function(imgIndex){\r\n\t\t\t\t\t// Open modal from an index if one passed\r\n\t\t\t\t\tscope.activeImageIndex = (imgIndex) ? imgIndex : 0;\r\n\r\n\t\t\t\t\tscope.opened = true; \r\n\r\n\t\t\t\t\t// call open event after transition\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tscope.onOpen();\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t// Close gallery modal\r\n\t\t\t\tscope.methods.close = function(){\r\n\t\t\t\t\tscope.opened = false; // Model closed\r\n\r\n\t\t\t\t\t// call close event after transition\r\n\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\tscope.onClose();\r\n\t\t\t\t\t\tscope.activeImageIndex = 0; // Reset index\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Change image to next\r\n\t\t\t\tscope.methods.next = function(){\r\n\t\t\t\t\tif(scope.activeImageIndex == (scope.images.length - 1)){\r\n\t\t\t\t\t\tscope.activeImageIndex = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tscope.activeImageIndex = scope.activeImageIndex + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Change image to prev\r\n\t\t\t\tscope.methods.prev = function(){\r\n\t\t\t\t\tif(scope.activeImageIndex == 0){\r\n\t\t\t\t\t\tscope.activeImageIndex = scope.images.length - 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tscope.activeImageIndex--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t// Close gallery on background click\r\n\t\t\t\tscope.backgroundClose = function(e){\r\n\t\t\t\t\tif(!scope.bgClose || scope.inline) return;\r\n\r\n\t\t\t\t\tvar noCloseClasses = [\r\n\t\t\t\t\t\t'galleria-image',\r\n\t\t\t\t\t\t'destroy-icons-container',\r\n\t\t\t\t\t\t'ext-url',\r\n\t\t\t\t\t\t'close',\r\n\t\t\t\t\t\t'next',\r\n\t\t\t\t\t\t'prev',\r\n\t\t\t\t\t\t'galleria-bubble'\r\n\t\t\t\t\t];\r\n\r\n\t\t\t\t\t// check if clicked element has a class that\r\n\t\t\t\t\t// belongs to `noCloseClasses`\r\n\t\t\t\t\tfor(var i = 0; i < e.target.classList.length; i++){\r\n\t\t\t\t\t\tif(noCloseClasses.indexOf(e.target.classList[i]) != -1){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t/***************************************************/\r\n\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t *\tUser interactions\r\n\t\t\t\t**/\r\n\r\n\t\t\t\t// Key events\r\n\t\t\t\t$document.bind('keyup', function(event){\r\n\t\t\t\t\t// If inline modal, do not interact\r\n\t\t\t\t\tif(scope.inline) return;\r\n\r\n\t\t\t\t\tif(event.which == keys.right || event.which == keys.enter){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.next();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(event.which == keys.left){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.prev();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(event.which == keys.esc){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Swipe events\r\n\t\t\t\tif(window.Hammer){\r\n\t\t\t\t\tvar hammerElem = new Hammer(elem[0]);\r\n\t\t\t\t\thammerElem.on('swiperight', function(ev){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.prev();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\thammerElem.on('swipeleft', function(ev){\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.next();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\thammerElem.on('doubletap', function(ev){\r\n\t\t\t\t\t\tif(scope.inline) return;\r\n\r\n\t\t\t\t\t\t$timeout(function(){\r\n\t\t\t\t\t\t\tscope.methods.close();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}]);\r\n })();"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/ng-image-gallery.min.js.map.gz b/dist/ng-image-gallery.min.js.map.gz index f831380..ee0fcda 100644 Binary files a/dist/ng-image-gallery.min.js.map.gz and b/dist/ng-image-gallery.min.js.map.gz differ diff --git a/package.json b/package.json index e719af4..167cdc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-image-gallery", - "version": "2.0.2", + "version": "2.0.2-rc.1", "description": "Probably the best angular inline and modal image gallery combined...", "main": "index.js", "directories": { diff --git a/src/js/directive.js b/src/js/directive.js index 10ed131..b221b8f 100644 --- a/src/js/directive.js +++ b/src/js/directive.js @@ -154,17 +154,17 @@ **/ // Modify scope models - scope.images = (scope.images) ? scope.images : []; - scope.methods = (scope.methods) ? scope.methods : {}; + scope.images = (scope.images != undefined) ? scope.images : []; + scope.methods = (scope.methods != undefined) ? scope.methods : {}; - scope.thumbnails = (scope.thumbnails) ? scope.thumbnails : true; - scope.inline = (scope.inline) ? scope.inline : false; - scope.bubbles = (scope.bubbles) ? scope.bubbles : true; - scope.imgBubbles = (scope.imgBubbles) ? scope.imgBubbles : false; - scope.bgClose = (scope.bgClose) ? scope.bgClose : false; + scope.thumbnails = (scope.thumbnails != undefined) ? scope.thumbnails : true; + scope.inline = (scope.inline != undefined) ? scope.inline : false; + scope.bubbles = (scope.bubbles != undefined) ? scope.bubbles : true; + scope.imgBubbles = (scope.imgBubbles != undefined) ? scope.imgBubbles : false; + scope.bgClose = (scope.bgClose != undefined) ? scope.bgClose : false; - scope.onOpen = (scope.onOpen) ? scope.onOpen : angular.noop; - scope.onClose = (scope.onClose) ? scope.onClose : angular.noop; + scope.onOpen = (scope.onOpen != undefined) ? scope.onOpen : angular.noop; + scope.onClose = (scope.onClose != undefined) ? scope.onClose : angular.noop; // If images populate dynamically, reset gallery diff --git a/src/sass/directive.scss b/src/sass/directive.scss index 32952eb..852dcbe 100644 --- a/src/sass/directive.scss +++ b/src/sass/directive.scss @@ -1,4 +1,10 @@ .ng-image-gallery{ + outline:none; + + *{ + outline:none; + } + .ng-image-gallery-thumbnails{ &:after{ content: ""; @@ -97,7 +103,6 @@ background-repeat:no-repeat; overflow: hidden; cursor: pointer; - outline: none; text-decoration: none; color:#fff; vertical-align: bottom; @@ -125,7 +130,6 @@ background-repeat:no-repeat; overflow: hidden; cursor: pointer; - outline: none; &.bubbles-on{ top:calc((100% - 50px) / 2); @@ -215,7 +219,6 @@ display: inline-block; margin:0 2px; cursor: pointer; - outline: none; overflow: hidden; border-radius: 100%; background-size: cover;