ngx-masonry
Advanced tools
Comparing version 9.1.1 to 9.2.0
@@ -284,6 +284,11 @@ (function (global, factory) { | ||
}; | ||
// public add(element: HTMLElement, prepend: boolean = false) { | ||
NgxMasonryComponent.prototype.add = function (element) { | ||
NgxMasonryComponent.prototype.add = function (element, prepend) { | ||
if (prepend === void 0) { prepend = false; } | ||
// Tell Masonry that a child element has been added | ||
this.masonryInstance.appended(element); | ||
if (prepend) { | ||
this.masonryInstance.prepended(element); | ||
} | ||
else { | ||
this.masonryInstance.appended(element); | ||
} | ||
// Check if first item | ||
@@ -333,2 +338,3 @@ if (this.masonryInstance.items.length === 1) { | ||
this.renderer = renderer; | ||
this.prepend = false; | ||
this.animations = { | ||
@@ -357,3 +363,3 @@ show: [ | ||
if (images.length === 0) { | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
} | ||
@@ -395,3 +401,3 @@ else { | ||
this.renderer.setStyle(this.element.nativeElement, 'opacity', '100'); | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
this.playAnimation(true); | ||
@@ -413,2 +419,5 @@ } | ||
]; }; | ||
__decorate([ | ||
core.Input() | ||
], NgxMasonryDirective.prototype, "prepend", void 0); | ||
NgxMasonryDirective = __decorate([ | ||
@@ -415,0 +424,0 @@ core.Directive({ |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("masonry-layout"),require("@angular/core"),require("@angular/common"),require("@angular/animations")):"function"==typeof define&&define.amd?define("ngx-masonry",["exports","masonry-layout","@angular/core","@angular/common","@angular/animations"],e):e((t=t||self)["ngx-masonry"]={},t.masonryLayout,t.ng.core,t.ng.common,t.ng.animations)}(this,(function(t,e,n,o,i){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var r;function a(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,o){e(n,o,t)}}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var l=function(){function t(t,e){this.platformId=t,this._element=e,this.updateLayout=!1,this.layoutComplete=new n.EventEmitter,this.removeComplete=new n.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;o.isPlatformBrowser(this.platformId)&&void 0===r&&(r=e),this.options||(this.options={}),this.options.itemSelector||(this.options.itemSelector="[ngxMasonryItem], ngxMasonryItem"),this.options.transitionDuration="0s",o.isPlatformBrowser(this.platformId)&&(this.masonryInstance=new r(this._element.nativeElement,this.options),this.masonryInstance.on("layoutComplete",(function(e){t.layoutComplete.emit(e)})),this.masonryInstance.on("removeComplete",(function(e){t.removeComplete.emit(e)})))},t.prototype.ngOnChanges=function(t){t.updateLayout&&(t.updateLayout.firstChange||this.layout())},t.prototype.ngOnDestroy=function(){this.masonryInstance&&this.masonryInstance.destroy()},t.prototype.layout=function(){var t=this;setTimeout((function(){t.masonryInstance.layout()}))},t.prototype.reloadItems=function(){var t=this;setTimeout((function(){t.masonryInstance.reloadItems()}))},t.prototype.add=function(t){this.masonryInstance.appended(t),1===this.masonryInstance.items.length&&this.masonryInstance.layout()},t.prototype.remove=function(t){this.masonryInstance.remove(t),this.layout()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]},{type:n.ElementRef}]},a([n.Input()],t.prototype,"options",void 0),a([n.Input()],t.prototype,"updateLayout",void 0),a([n.Output()],t.prototype,"layoutComplete",void 0),a([n.Output()],t.prototype,"removeComplete",void 0),t=a([n.Component({selector:"[ngx-masonry], ngx-masonry",template:"<ng-content></ng-content>",styles:["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}),s(0,n.Inject(n.PLATFORM_ID))],t)}(),p=function(){function t(t,e,n,o){this.builder=t,this.element=e,this.parent=n,this.renderer=o,this.animations={show:[i.style({opacity:0}),i.animate("400ms ease-in",i.style({opacity:1}))],hide:[i.style({opacity:"*"}),i.animate("400ms ease-in",i.style({opacity:0}))]}}return t.prototype.ngOnInit=function(){void 0!==this.parent.options.animations&&(this.animations=this.parent.options.animations)},t.prototype.ngAfterViewInit=function(){var t,e,n=this,o=this.element.nativeElement.getElementsByTagName("img");if(this.renderer.setStyle(this.element.nativeElement,"opacity","0"),this.images=new Set(o),0===o.length)this.parent.add(this.element.nativeElement);else{var i=function(t){r.renderer.listen(t,"load",(function(e){n.imageLoaded(t)})),r.renderer.listen(t,"error",(function(e){n.imageLoaded(t)}))},r=this;try{for(var a=m(o),s=a.next();!s.done;s=a.next()){i(s.value)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}},t.prototype.ngOnDestroy=function(){0===this.images.size&&this.element.nativeElement.parentNode&&(this.playAnimation(!1),this.parent.remove(this.element.nativeElement))},t.prototype.imageLoaded=function(t){this.images.delete(t),0===this.images.size&&(this.renderer.setStyle(this.element.nativeElement,"opacity","100"),this.parent.add(this.element.nativeElement),this.playAnimation(!0))},t.prototype.playAnimation=function(t){var e=t?this.animations.show:this.animations.hide;e&&this.builder.build(e).create(this.element.nativeElement).play()},t.ctorParameters=function(){return[{type:i.AnimationBuilder},{type:n.ElementRef},{type:l,decorators:[{type:n.Inject,args:[n.forwardRef((function(){return l}))]}]},{type:n.Renderer2}]},t=a([n.Directive({selector:"[ngxMasonryItem], ngxMasonryItem"}),s(2,n.Inject(n.forwardRef((function(){return l}))))],t)}(),u=function(){function t(){}return t=a([n.NgModule({imports:[],declarations:[l,p],exports:[l,p]})],t)}();t.NgxMasonryComponent=l,t.NgxMasonryDirective=p,t.NgxMasonryModule=u,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("masonry-layout"),require("@angular/core"),require("@angular/common"),require("@angular/animations")):"function"==typeof define&&define.amd?define("ngx-masonry",["exports","masonry-layout","@angular/core","@angular/common","@angular/animations"],e):e((t=t||self)["ngx-masonry"]={},t.masonryLayout,t.ng.core,t.ng.common,t.ng.animations)}(this,(function(t,e,n,o,i){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var r;function a(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,o){e(n,o,t)}}function p(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var m=function(){function t(t,e){this.platformId=t,this._element=e,this.updateLayout=!1,this.layoutComplete=new n.EventEmitter,this.removeComplete=new n.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;o.isPlatformBrowser(this.platformId)&&void 0===r&&(r=e),this.options||(this.options={}),this.options.itemSelector||(this.options.itemSelector="[ngxMasonryItem], ngxMasonryItem"),this.options.transitionDuration="0s",o.isPlatformBrowser(this.platformId)&&(this.masonryInstance=new r(this._element.nativeElement,this.options),this.masonryInstance.on("layoutComplete",(function(e){t.layoutComplete.emit(e)})),this.masonryInstance.on("removeComplete",(function(e){t.removeComplete.emit(e)})))},t.prototype.ngOnChanges=function(t){t.updateLayout&&(t.updateLayout.firstChange||this.layout())},t.prototype.ngOnDestroy=function(){this.masonryInstance&&this.masonryInstance.destroy()},t.prototype.layout=function(){var t=this;setTimeout((function(){t.masonryInstance.layout()}))},t.prototype.reloadItems=function(){var t=this;setTimeout((function(){t.masonryInstance.reloadItems()}))},t.prototype.add=function(t,e){void 0===e&&(e=!1),e?this.masonryInstance.prepended(t):this.masonryInstance.appended(t),1===this.masonryInstance.items.length&&this.masonryInstance.layout()},t.prototype.remove=function(t){this.masonryInstance.remove(t),this.layout()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]},{type:n.ElementRef}]},a([n.Input()],t.prototype,"options",void 0),a([n.Input()],t.prototype,"updateLayout",void 0),a([n.Output()],t.prototype,"layoutComplete",void 0),a([n.Output()],t.prototype,"removeComplete",void 0),t=a([n.Component({selector:"[ngx-masonry], ngx-masonry",template:"<ng-content></ng-content>",styles:["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}),s(0,n.Inject(n.PLATFORM_ID))],t)}(),l=function(){function t(t,e,n,o){this.builder=t,this.element=e,this.parent=n,this.renderer=o,this.prepend=!1,this.animations={show:[i.style({opacity:0}),i.animate("400ms ease-in",i.style({opacity:1}))],hide:[i.style({opacity:"*"}),i.animate("400ms ease-in",i.style({opacity:0}))]}}return t.prototype.ngOnInit=function(){void 0!==this.parent.options.animations&&(this.animations=this.parent.options.animations)},t.prototype.ngAfterViewInit=function(){var t,e,n=this,o=this.element.nativeElement.getElementsByTagName("img");if(this.renderer.setStyle(this.element.nativeElement,"opacity","0"),this.images=new Set(o),0===o.length)this.parent.add(this.element.nativeElement,this.prepend);else{var i=function(t){r.renderer.listen(t,"load",(function(e){n.imageLoaded(t)})),r.renderer.listen(t,"error",(function(e){n.imageLoaded(t)}))},r=this;try{for(var a=p(o),s=a.next();!s.done;s=a.next()){i(s.value)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}},t.prototype.ngOnDestroy=function(){0===this.images.size&&this.element.nativeElement.parentNode&&(this.playAnimation(!1),this.parent.remove(this.element.nativeElement))},t.prototype.imageLoaded=function(t){this.images.delete(t),0===this.images.size&&(this.renderer.setStyle(this.element.nativeElement,"opacity","100"),this.parent.add(this.element.nativeElement,this.prepend),this.playAnimation(!0))},t.prototype.playAnimation=function(t){var e=t?this.animations.show:this.animations.hide;e&&this.builder.build(e).create(this.element.nativeElement).play()},t.ctorParameters=function(){return[{type:i.AnimationBuilder},{type:n.ElementRef},{type:m,decorators:[{type:n.Inject,args:[n.forwardRef((function(){return m}))]}]},{type:n.Renderer2}]},a([n.Input()],t.prototype,"prepend",void 0),t=a([n.Directive({selector:"[ngxMasonryItem], ngxMasonryItem"}),s(2,n.Inject(n.forwardRef((function(){return m}))))],t)}(),u=function(){function t(){}return t=a([n.NgModule({imports:[],declarations:[m,l],exports:[m,l]})],t)}();t.NgxMasonryComponent=m,t.NgxMasonryDirective=l,t.NgxMasonryModule=u,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-masonry.umd.min.js.map |
@@ -62,6 +62,10 @@ import { __decorate, __param } from "tslib"; | ||
} | ||
// public add(element: HTMLElement, prepend: boolean = false) { | ||
add(element) { | ||
add(element, prepend = false) { | ||
// Tell Masonry that a child element has been added | ||
this.masonryInstance.appended(element); | ||
if (prepend) { | ||
this.masonryInstance.prepended(element); | ||
} | ||
else { | ||
this.masonryInstance.appended(element); | ||
} | ||
// Check if first item | ||
@@ -108,2 +112,2 @@ if (this.masonryInstance.items.length === 1) { | ||
export { NgxMasonryComponent }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIv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GVtZW50OiBIVE1MRWxlbWVudCkge1xuICAgIC8vIFRlbGwgTWFzb25yeSB0aGF0IGEgY2hpbGQgZWxlbWVudCBoYXMgYmVlbiByZW1vdmVkXG4gICAgdGhpcy5tYXNvbnJ5SW5zdGFuY2UucmVtb3ZlKGVsZW1lbnQpO1xuXG4gICAgLy8gTGF5b3V0IGl0ZW1zXG4gICAgdGhpcy5sYXlvdXQoKTtcbiAgfVxufVxuIl19 |
import { __decorate, __param } from "tslib"; | ||
import { Directive, Inject, ElementRef, forwardRef, OnDestroy, AfterViewInit, Renderer2, OnInit } from '@angular/core'; | ||
import { Directive, Inject, ElementRef, forwardRef, OnDestroy, AfterViewInit, Renderer2, OnInit, Input } from '@angular/core'; | ||
import { style, animate, AnimationBuilder } from '@angular/animations'; | ||
@@ -11,2 +11,3 @@ import { NgxMasonryComponent } from './ngx-masonry.component'; | ||
this.renderer = renderer; | ||
this.prepend = false; | ||
this.animations = { | ||
@@ -33,3 +34,3 @@ show: [ | ||
if (images.length === 0) { | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
} | ||
@@ -57,3 +58,3 @@ else { | ||
this.renderer.setStyle(this.element.nativeElement, 'opacity', '100'); | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
this.playAnimation(true); | ||
@@ -76,2 +77,5 @@ } | ||
]; | ||
__decorate([ | ||
Input() | ||
], NgxMasonryDirective.prototype, "prepend", void 0); | ||
NgxMasonryDirective = __decorate([ | ||
@@ -84,2 +88,2 @@ Directive({ | ||
export { NgxMasonryDirective }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIvbmd4LW1hc29ucnkuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpb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MucmVuZGVyZXIuc2V0U3R5bGUodGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQsICdvcGFjaXR5JywgJzEwMCcpO1xuICAgICAgdGhpcy5wYXJlbnQuYWRkKHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LCB0aGlzLnByZXBlbmQpO1xuICAgICAgdGhpcy5wbGF5QW5pbWF0aW9uKHRydWUpO1xuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgcGxheUFuaW1hdGlvbihzaG93OiBib29sZWFuKSB7XG4gICAgY29uc3QgbWV0YWRhdGEgPSBzaG93ID8gdGhpcy5hbmltYXRpb25zLnNob3cgOiB0aGlzLmFuaW1hdGlvbnMuaGlkZTtcbiAgICBpZiAobWV0YWRhdGEpIHtcbiAgICAgIGNvbnN0IHBsYXllciA9IHRoaXMuYnVpbGRlci5idWlsZChtZXRhZGF0YSkuY3JlYXRlKHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50KTtcbiAgICAgIHBsYXllci5wbGF5KCk7XG4gICAgfVxuICB9XG59XG4iXX0= |
@@ -65,6 +65,11 @@ import { __decorate, __param } from "tslib"; | ||
}; | ||
// public add(element: HTMLElement, prepend: boolean = false) { | ||
NgxMasonryComponent.prototype.add = function (element) { | ||
NgxMasonryComponent.prototype.add = function (element, prepend) { | ||
if (prepend === void 0) { prepend = false; } | ||
// Tell Masonry that a child element has been added | ||
this.masonryInstance.appended(element); | ||
if (prepend) { | ||
this.masonryInstance.prepended(element); | ||
} | ||
else { | ||
this.masonryInstance.appended(element); | ||
} | ||
// Check if first item | ||
@@ -108,2 +113,2 @@ if (this.masonryInstance.items.length === 1) { | ||
export { NgxMasonryComponent }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LW1hc29ucnkvIiwic291cmNlcyI6WyJsaWIvbmd4LW1hc29ucn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1xuICAgICAgdGhpcy5tYXNvbnJ5SW5zdGFuY2UubGF5b3V0KCk7XG4gICAgfVxuICB9XG5cbiAgcHVibGljIHJlbW92ZShlbGVtZW50OiBIVE1MRWxlbWVudCkge1xuICAgIC8vIFRlbGwgTWFzb25yeSB0aGF0IGEgY2hpbGQgZWxlbWVudCBoYXMgYmVlbiByZW1vdmVkXG4gICAgdGhpcy5tYXNvbnJ5SW5zdGFuY2UucmVtb3ZlKGVsZW1lbnQpO1xuXG4gICAgLy8gTGF5b3V0IGl0ZW1zXG4gICAgdGhpcy5sYXlvdXQoKTtcbiAgfVxufVxuIl19 |
import { __decorate, __param, __values } from "tslib"; | ||
import { Directive, Inject, ElementRef, forwardRef, OnDestroy, AfterViewInit, Renderer2, OnInit } from '@angular/core'; | ||
import { Directive, Inject, ElementRef, forwardRef, OnDestroy, AfterViewInit, Renderer2, OnInit, Input } from '@angular/core'; | ||
import { style, animate, AnimationBuilder } from '@angular/animations'; | ||
@@ -11,2 +11,3 @@ import { NgxMasonryComponent } from './ngx-masonry.component'; | ||
this.renderer = renderer; | ||
this.prepend = false; | ||
this.animations = { | ||
@@ -35,3 +36,3 @@ show: [ | ||
if (images.length === 0) { | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
} | ||
@@ -73,3 +74,3 @@ else { | ||
this.renderer.setStyle(this.element.nativeElement, 'opacity', '100'); | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
this.playAnimation(true); | ||
@@ -91,2 +92,5 @@ } | ||
]; }; | ||
__decorate([ | ||
Input() | ||
], NgxMasonryDirective.prototype, "prepend", void 0); | ||
NgxMasonryDirective = __decorate([ | ||
@@ -101,2 +105,2 @@ Directive({ | ||
export { NgxMasonryDirective }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc29ucnkuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vd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gpIHtcbiAgICBpZiAodGhpcy5pbWFnZXMuc2l6ZSA9PT0gMCAmJiB0aGlzLmVsZW1lbnQubmF0aXZlRWxlbWVudC5wYXJlbnROb2RlKSB7XG4gICAgICB0aGlzLnBsYXlBbmltYXRpb24oZmFsc2UpO1xuICAgICAgdGhpcy5wYXJlbnQucmVtb3ZlKHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50KTtcbiAgICB9XG4gIH1cblxuICBwcml2YXRlIGltYWdlTG9hZGVkKGltYWdlPzogSFRNTEltYWdlRWxlbWVudCkge1xuICAgIHRoaXMuaW1hZ2VzLmRlbGV0ZShpbWFnZSk7XG4gICAgaWYgKHRoaXMuaW1hZ2VzLnNpemUgPT09IDApIHtcbiAgICAgIHRoaXMucmVuZGVyZXIuc2V0U3R5bGUodGhpcy5lbGVtZW50Lm5hdGl2ZUVsZW1lbnQsICdvcGFjaXR5JywgJzEwMCcpO1xuICAgICAgdGhpcy5wYXJlbnQuYWRkKHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50LCB0aGlzLnByZXBlbmQpO1xuICAgICAgdGhpcy5wbGF5QW5pbWF0aW9uKHRydWUpO1xuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgcGxheUFuaW1hdGlvbihzaG93OiBib29sZWFuKSB7XG4gICAgY29uc3QgbWV0YWRhdGEgPSBzaG93ID8gdGhpcy5hbmltYXRpb25zLnNob3cgOiB0aGlzLmFuaW1hdGlvbnMuaGlkZTtcbiAgICBpZiAobWV0YWRhdGEpIHtcbiAgICAgIGNvbnN0IHBsYXllciA9IHRoaXMuYnVpbGRlci5idWlsZChtZXRhZGF0YSkuY3JlYXRlKHRoaXMuZWxlbWVudC5uYXRpdmVFbGVtZW50KTtcbiAgICAgIHBsYXllci5wbGF5KCk7XG4gICAgfVxuICB9XG59XG4iXX0= |
@@ -65,6 +65,10 @@ import masonryLayout from 'masonry-layout'; | ||
} | ||
// public add(element: HTMLElement, prepend: boolean = false) { | ||
add(element) { | ||
add(element, prepend = false) { | ||
// Tell Masonry that a child element has been added | ||
this.masonryInstance.appended(element); | ||
if (prepend) { | ||
this.masonryInstance.prepended(element); | ||
} | ||
else { | ||
this.masonryInstance.appended(element); | ||
} | ||
// Check if first item | ||
@@ -117,2 +121,3 @@ if (this.masonryInstance.items.length === 1) { | ||
this.renderer = renderer; | ||
this.prepend = false; | ||
this.animations = { | ||
@@ -139,3 +144,3 @@ show: [ | ||
if (images.length === 0) { | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
} | ||
@@ -163,3 +168,3 @@ else { | ||
this.renderer.setStyle(this.element.nativeElement, 'opacity', '100'); | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
this.playAnimation(true); | ||
@@ -182,2 +187,5 @@ } | ||
]; | ||
__decorate([ | ||
Input() | ||
], NgxMasonryDirective.prototype, "prepend", void 0); | ||
NgxMasonryDirective = __decorate([ | ||
@@ -184,0 +192,0 @@ Directive({ |
@@ -68,6 +68,11 @@ import masonryLayout from 'masonry-layout'; | ||
}; | ||
// public add(element: HTMLElement, prepend: boolean = false) { | ||
NgxMasonryComponent.prototype.add = function (element) { | ||
NgxMasonryComponent.prototype.add = function (element, prepend) { | ||
if (prepend === void 0) { prepend = false; } | ||
// Tell Masonry that a child element has been added | ||
this.masonryInstance.appended(element); | ||
if (prepend) { | ||
this.masonryInstance.prepended(element); | ||
} | ||
else { | ||
this.masonryInstance.appended(element); | ||
} | ||
// Check if first item | ||
@@ -117,2 +122,3 @@ if (this.masonryInstance.items.length === 1) { | ||
this.renderer = renderer; | ||
this.prepend = false; | ||
this.animations = { | ||
@@ -141,3 +147,3 @@ show: [ | ||
if (images.length === 0) { | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
} | ||
@@ -179,3 +185,3 @@ else { | ||
this.renderer.setStyle(this.element.nativeElement, 'opacity', '100'); | ||
this.parent.add(this.element.nativeElement); | ||
this.parent.add(this.element.nativeElement, this.prepend); | ||
this.playAnimation(true); | ||
@@ -197,2 +203,5 @@ } | ||
]; }; | ||
__decorate([ | ||
Input() | ||
], NgxMasonryDirective.prototype, "prepend", void 0); | ||
NgxMasonryDirective = __decorate([ | ||
@@ -199,0 +208,0 @@ Directive({ |
@@ -17,4 +17,4 @@ import { OnInit, OnChanges, SimpleChanges, OnDestroy, ElementRef, EventEmitter } from '@angular/core'; | ||
reloadItems(): void; | ||
add(element: HTMLElement): void; | ||
add(element: HTMLElement, prepend?: boolean): void; | ||
remove(element: HTMLElement): void; | ||
} |
@@ -9,2 +9,3 @@ import { ElementRef, OnDestroy, AfterViewInit, Renderer2, OnInit } from '@angular/core'; | ||
private renderer; | ||
prepend: boolean; | ||
private images; | ||
@@ -11,0 +12,0 @@ private animations; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"NgxMasonryComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"[ngx-masonry], ngx-masonry","template":"<ng-content></ng-content>","styles":["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":32,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":32,"character":22}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":32,"character":78}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"updateLayout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"layoutComplete":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":3}}]}],"removeComplete":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":3}}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"layout":[{"__symbolic":"method"}],"reloadItems":[{"__symbolic":"method"}],"add":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}},"NgxMasonryDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[ngxMasonryItem], ngxMasonryItem"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":26,"character":5},"arguments":[{"__symbolic":"reference","name":"NgxMasonryComponent"}]}],null],"parameters":[{"__symbolic":"reference","module":"@angular/animations","name":"AnimationBuilder","line":24,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":25,"character":21},{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":27,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"imageLoaded":[{"__symbolic":"method"}],"playAnimation":[{"__symbolic":"method"}]}},"NgxMasonryOptions":{"__symbolic":"interface"},"NgxMasonryAnimations":{"__symbolic":"interface"},"NgxMasonryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[],"declarations":[{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","name":"NgxMasonryDirective"}],"exports":[{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","name":"NgxMasonryDirective"}]}]}],"members":{}}},"origins":{"NgxMasonryComponent":"./lib/ngx-masonry.component","NgxMasonryDirective":"./lib/ngx-masonry.directive","NgxMasonryOptions":"./lib/ngx-masonry-options","NgxMasonryAnimations":"./lib/ngx-masonry-options","NgxMasonryModule":"./lib/ngx-masonry.module"},"importAs":"ngx-masonry"} | ||
{"__symbolic":"module","version":4,"metadata":{"NgxMasonryComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"[ngx-masonry], ngx-masonry","template":"<ng-content></ng-content>","styles":["\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t}\n\t"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":32,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":32,"character":22}]}],null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":32,"character":78}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"updateLayout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"layoutComplete":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":3}}]}],"removeComplete":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":3}}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"layout":[{"__symbolic":"method"}],"reloadItems":[{"__symbolic":"method"}],"add":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}]}},"NgxMasonryDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[ngxMasonryItem], ngxMasonryItem"}]}],"members":{"prepend":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":27,"character":5},"arguments":[{"__symbolic":"reference","name":"NgxMasonryComponent"}]}],null],"parameters":[{"__symbolic":"reference","module":"@angular/animations","name":"AnimationBuilder","line":25,"character":21},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":21},{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":28,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"imageLoaded":[{"__symbolic":"method"}],"playAnimation":[{"__symbolic":"method"}]}},"NgxMasonryOptions":{"__symbolic":"interface"},"NgxMasonryAnimations":{"__symbolic":"interface"},"NgxMasonryModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[],"declarations":[{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","name":"NgxMasonryDirective"}],"exports":[{"__symbolic":"reference","name":"NgxMasonryComponent"},{"__symbolic":"reference","name":"NgxMasonryDirective"}]}]}],"members":{}}},"origins":{"NgxMasonryComponent":"./lib/ngx-masonry.component","NgxMasonryDirective":"./lib/ngx-masonry.directive","NgxMasonryOptions":"./lib/ngx-masonry-options","NgxMasonryAnimations":"./lib/ngx-masonry-options","NgxMasonryModule":"./lib/ngx-masonry.module"},"importAs":"ngx-masonry"} |
{ | ||
"name": "ngx-masonry", | ||
"version": "9.1.1", | ||
"version": "9.2.0", | ||
"description": "Angular Module for displaying a feed of items in a masonry layout using https://github.com/desandro/masonry", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -17,2 +17,3 @@ # Angular Module for displaying a feed of items in a masonry layout using [https://github.com/desandro/masonry](https://github.com/desandro/masonry) | ||
- html watcher was removed for better performance. Users need to have their own listener and call `layout()` when certain events are triggered | ||
- support prepend item | ||
@@ -159,5 +160,7 @@ ## Installation | ||
## FAQ | ||
* Why does masonry have wrong order? | ||
- Why does masonry have wrong order? | ||
The new item is always appended to the list because there is no "insert" function supported in masonry-layout. If the order changed and you want to update the order of items, use `reloadItems()` | ||
```typescript | ||
@@ -172,3 +175,3 @@ // get reference | ||
* Why is the transitionDuration option not supported? | ||
- Why is the transitionDuration option not supported? | ||
@@ -181,3 +184,3 @@ The builtin animation of masonry-layout doesn't work with angular well. | ||
* How to setup if I use SystemJS? | ||
- How to setup if I use SystemJS? | ||
@@ -184,0 +187,0 @@ If you're using SystemJS add `ngx-masonry` and `masonry-layout` to your configuration: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
190659
1390
200