Skip to content

Commit 9441603

Browse files
add optional parameter [includeViewer] to support use cases where viewer is placed outside the gallery component manually
1 parent 713f213 commit 9441603

File tree

5 files changed

+36
-7
lines changed

5 files changed

+36
-7
lines changed

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,19 @@ Additional optional parameter to support multiple galleries. Add it if you want
6868
[flexImageSize]="7"
6969
[galleryName]="'yourGalleryName'"
7070
[maxRowsPerPage]="100"
71-
(viewerChange)="yourNotificationFunction($event)">
72-
</gallery>
71+
(viewerChange)="yourNotificationFunction($event)"
72+
[includeViewer]="true"
73+
></gallery>
7374
```
7475

75-
All parameters are optional. You may play around on the demo site to find out what parameters suit your needs.
76+
All parameters are optional.
7677

77-
The viewerChange event fires once the viewer component gets opened or closed.
78+
* **[flexBorderSize]** used to define the border thickness between the images within the gallery.
79+
* **[flexImageSize]** used to define the size of the images with the gallery (not the viewer).
80+
* **[galleryName]** used when having multiple galleries.
81+
* **[maxRowsPerPage]** maximum rows per gallery, this will add navigation arrows once the threshold is reached.
82+
* **[viewerChange]** event fires once the viewer component gets opened or closed.
83+
* **[includeViewer]** provides an option to manually place the viewer outside the default DOM structure. Defaults to true.
7884

7985
## Different use cases
8086
### Fetching images from an external data source
@@ -90,3 +96,23 @@ This is possible, but not the intent of this project. Please [CLICK HERE](https:
9096
If the conversion process fails, make sure you have enough swap space provided.
9197

9298
If you experience any other issues, please raise an issue on GitHub.
99+
100+
## Changelog
101+
102+
### 15.1.0
103+
104+
* Adding optional parameter [includeViewer] to support use cases where viewer is placed outside the gallery component manually
105+
106+
### 15.0.0
107+
108+
* Angular 15 support
109+
* Performance improvements
110+
111+
### 14.1.0
112+
113+
* Refactor convert script entirely
114+
* Provide smoother output for image conversion process
115+
116+
### 14.0.0
117+
118+
* Angular 14 support

projects/angular2-image-gallery/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-image-gallery",
3-
"version": "15.0.0",
3+
"version": "15.1.0",
44
"description": "Responsive Angular 15 image gallery",
55
"repository": {
66
"type": "git",

projects/angular2-image-gallery/src/lib/gallery/gallery.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
</div>
3232
</div>
3333

34-
<viewer></viewer>
34+
<viewer *ngIf="includeViewer"></viewer>

projects/angular2-image-gallery/src/lib/gallery/gallery.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export class GalleryComponent implements OnInit, OnDestroy, OnChanges {
4141
@Input('galleryName') providedGalleryName: string = ''
4242
@Input('metadataUri') providedMetadataUri: string = undefined
4343
@Input('maxRowsPerPage') rowsPerPage: number = 200
44+
@Input('includeViewer') includeViewer = true
4445

4546
@Output() viewerChange = new EventEmitter<boolean>()
4647

src/app/demo.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
[flexBorderSize]="flexBorderSize"
2424
[flexImageSize]="flexImageSize"
2525
[maxRowsPerPage]="15"
26-
[galleryName]="galleryName"></gallery>
26+
[galleryName]="galleryName"
27+
[includeViewer]="false">
28+
</gallery>
2729
<br /><br />

0 commit comments

Comments
 (0)