@autotaxatiepartners/ngx-gallery 1.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -19
- package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.html +22 -7
- package/projects/gallery/src/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.ts +7 -7
- package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.html +1 -1
- package/projects/gallery/src/lib/ngx-gallery-image/ngx-gallery-image.component.ts +67 -81
- package/projects/gallery/src/lib/ngx-gallery-options.ts +6 -0
- package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.html +83 -32
- package/projects/gallery/src/lib/ngx-gallery-preview/ngx-gallery-preview.component.ts +296 -163
- package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.html +35 -34
- package/projects/gallery/src/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.ts +1 -0
- package/projects/gallery/src/lib/ngx-gallery.component.html +3 -3
- package/projects/gallery/src/lib/ngx-gallery.component.scss +0 -1
- package/projects/gallery/src/lib/ngx-gallery.component.ts +0 -1
- package/projects/gallery-app/src/app/app.component.ts +10 -4
- package/projects/gallery-app/src/app/app.module.ts +3 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autotaxatiepartners/ngx-gallery",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "ng serve",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
},
|
|
21
21
|
"private": false,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@angular/animations": "^20.
|
|
24
|
-
"@angular/common": "^20.
|
|
25
|
-
"@angular/compiler": "^20.
|
|
26
|
-
"@angular/core": "^20.
|
|
27
|
-
"@angular/forms": "^20.
|
|
28
|
-
"@angular/platform-browser": "^20.
|
|
29
|
-
"@angular/platform-browser-dynamic": "^20.
|
|
30
|
-
"@angular/router": "^20.
|
|
23
|
+
"@angular/animations": "^20.3.10",
|
|
24
|
+
"@angular/common": "^20.3.10",
|
|
25
|
+
"@angular/compiler": "^20.3.10",
|
|
26
|
+
"@angular/core": "^20.3.10",
|
|
27
|
+
"@angular/forms": "^20.3.10",
|
|
28
|
+
"@angular/platform-browser": "^20.3.10",
|
|
29
|
+
"@angular/platform-browser-dynamic": "^20.3.10",
|
|
30
|
+
"@angular/router": "^20.3.10",
|
|
31
31
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
32
32
|
"karma-viewport": "^1.0.8",
|
|
33
33
|
"rxjs": "^6.5.4",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"zone.js": "~0.15.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@angular-devkit/build-angular": "^20.
|
|
39
|
-
"@angular-eslint/builder": "20.
|
|
40
|
-
"@angular-eslint/eslint-plugin": "20.
|
|
41
|
-
"@angular-eslint/eslint-plugin-template": "20.
|
|
42
|
-
"@angular-eslint/schematics": "20.
|
|
43
|
-
"@angular-eslint/template-parser": "20.
|
|
44
|
-
"@angular/cli": "^20.
|
|
45
|
-
"@angular/compiler-cli": "^20.
|
|
46
|
-
"@angular/language-service": "^20.
|
|
38
|
+
"@angular-devkit/build-angular": "^20.3.9",
|
|
39
|
+
"@angular-eslint/builder": "20.6.0",
|
|
40
|
+
"@angular-eslint/eslint-plugin": "20.6.0",
|
|
41
|
+
"@angular-eslint/eslint-plugin-template": "20.6.0",
|
|
42
|
+
"@angular-eslint/schematics": "20.6.0",
|
|
43
|
+
"@angular-eslint/template-parser": "20.6.0",
|
|
44
|
+
"@angular/cli": "^20.3.9",
|
|
45
|
+
"@angular/compiler-cli": "^20.3.10",
|
|
46
|
+
"@angular/language-service": "^20.3.10",
|
|
47
47
|
"@types/jasmine": "~3.10.2",
|
|
48
48
|
"@types/jasminewd2": "~2.0.10",
|
|
49
49
|
"@types/node": "^12.11.2",
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"type": "git",
|
|
69
69
|
"url": "https://gitlab.com/autotaxatiepartners/ngx-gallery.git"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
<div class="ngx-gallery-arrows-wrapper ngx-gallery-arrow-left">
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="ngx-gallery-icon ngx-gallery-arrow"
|
|
4
|
+
aria-hidden="true"
|
|
5
|
+
(click)="handlePrevClick()"
|
|
6
|
+
[class.ngx-gallery-disabled]="prevDisabled"
|
|
7
|
+
>
|
|
8
|
+
<i
|
|
9
|
+
[ngClass]="['ngx-gallery-icon-content', arrowPrevIcon]"
|
|
10
|
+
[style.fontSize.px]="arrowIconSize"
|
|
11
|
+
></i>
|
|
5
12
|
</div>
|
|
6
13
|
</div>
|
|
14
|
+
|
|
7
15
|
<div class="ngx-gallery-arrows-wrapper ngx-gallery-arrow-right">
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
<div
|
|
17
|
+
class="ngx-gallery-icon ngx-gallery-arrow"
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
(click)="handleNextClick()"
|
|
20
|
+
[class.ngx-gallery-disabled]="nextDisabled"
|
|
21
|
+
>
|
|
22
|
+
<i
|
|
23
|
+
[ngClass]="['ngx-gallery-icon-content', arrowNextIcon]"
|
|
24
|
+
[style.fontSize.px]="arrowIconSize"
|
|
25
|
+
></i>
|
|
11
26
|
</div>
|
|
12
|
-
</div>
|
|
27
|
+
</div>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, input, Input, OnInit, Output } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Component({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
selector: 'ngx-gallery-arrows',
|
|
5
|
+
templateUrl: './ngx-gallery-arrows.component.html',
|
|
6
|
+
styleUrls: ['./ngx-gallery-arrows.component.scss'],
|
|
7
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: false
|
|
9
9
|
})
|
|
10
10
|
export class NgxGalleryArrowsComponent {
|
|
11
11
|
@Input() prevDisabled: boolean;
|
|
12
12
|
@Input() nextDisabled: boolean;
|
|
13
13
|
@Input() arrowPrevIcon: string;
|
|
14
14
|
@Input() arrowNextIcon: string;
|
|
15
|
-
|
|
15
|
+
@Input() arrowIconSize: number;
|
|
16
16
|
@Output() prevClick = new EventEmitter();
|
|
17
17
|
@Output() nextClick = new EventEmitter();
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
}
|
|
44
44
|
@if (arrows) {
|
|
45
45
|
<ngx-gallery-arrows class="ngx-gallery-image-size-{{size}}" (prevClick)="showPrev()" (nextClick)="showNext()"
|
|
46
|
-
[prevDisabled]="!canShowPrev()" [nextDisabled]="!canShowNext()" [arrowPrevIcon]="arrowPrevIcon"
|
|
46
|
+
[prevDisabled]="!canShowPrev()" [nextDisabled]="!canShowNext()" [arrowPrevIcon]="arrowPrevIcon" [arrowIconSize]="arrowIconSize"
|
|
47
47
|
[arrowNextIcon]="arrowNextIcon"></ngx-gallery-arrows>
|
|
48
48
|
}
|
|
49
49
|
</div>
|
|
@@ -1,84 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Input,
|
|
9
|
-
OnChanges,
|
|
10
|
-
OnInit,
|
|
11
|
-
Output,
|
|
12
|
-
SimpleChanges
|
|
13
|
-
} from '@angular/core';
|
|
14
|
-
import {DomSanitizer, SafeResourceUrl, SafeStyle} from '@angular/platform-browser';
|
|
15
|
-
import {NgxGalleryService} from '../ngx-gallery.service';
|
|
16
|
-
import {NgxGalleryOrderedImage} from '../ngx-gallery-ordered-image';
|
|
17
|
-
import {NgxGalleryAction} from '../ngx-gallery-action';
|
|
18
|
-
import {NgxGalleryAnimation} from '../ngx-gallery-animation';
|
|
19
|
-
import {animate, AnimationEvent, state, style, transition, trigger} from '@angular/animations';
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeResourceUrl, SafeStyle } from '@angular/platform-browser';
|
|
3
|
+
import { NgxGalleryService } from '../ngx-gallery.service';
|
|
4
|
+
import { NgxGalleryOrderedImage } from '../ngx-gallery-ordered-image';
|
|
5
|
+
import { NgxGalleryAction } from '../ngx-gallery-action';
|
|
6
|
+
import { NgxGalleryAnimation } from '../ngx-gallery-animation';
|
|
7
|
+
import { animate, AnimationEvent, state, style, transition, trigger } from '@angular/animations';
|
|
20
8
|
|
|
21
9
|
type Orientation = ('slideLeft' | 'slideRight' | 'fade' | 'rotateLeft' | 'rotateRight' | 'zoom' | 'none');
|
|
22
10
|
|
|
23
11
|
@Component({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
12
|
+
selector: 'ngx-gallery-image',
|
|
13
|
+
templateUrl: './ngx-gallery-image.component.html',
|
|
14
|
+
styleUrls: ['./ngx-gallery-image.component.scss'],
|
|
15
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
+
animations: [
|
|
17
|
+
trigger('animation', [
|
|
18
|
+
// ...
|
|
19
|
+
state('slideRight', style({})),
|
|
20
|
+
state('slideLeft', style({})),
|
|
21
|
+
state('fade', style({})),
|
|
22
|
+
state('rotateLeft', style({})),
|
|
23
|
+
state('rotateRight', style({})),
|
|
24
|
+
state('zoom', style({})),
|
|
25
|
+
transition('slideRight => void', [
|
|
26
|
+
animate('500ms ease-in-out', style({ transform: 'translateX(-100%)' }))
|
|
27
|
+
]),
|
|
28
|
+
transition('void => slideRight', [
|
|
29
|
+
style({ transform: 'translateX(100%)' }),
|
|
30
|
+
animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
|
|
31
|
+
]),
|
|
32
|
+
transition('slideLeft => void', [
|
|
33
|
+
animate('500ms ease-in-out', style({ transform: 'translateX(100%)' }))
|
|
34
|
+
]),
|
|
35
|
+
transition('void => slideLeft', [
|
|
36
|
+
style({ transform: 'translateX(-100%)' }),
|
|
37
|
+
animate('500ms ease-in-out', style({ transform: 'translateX(0)' }))
|
|
38
|
+
]),
|
|
39
|
+
transition('fade => void', [
|
|
40
|
+
animate('500ms ease-in-out', style({ opacity: '0' }))
|
|
41
|
+
]),
|
|
42
|
+
transition('void => fade', [
|
|
43
|
+
style({ opacity: '0' }),
|
|
44
|
+
animate('500ms ease-in-out', style({ opacity: '1' }))
|
|
45
|
+
]),
|
|
46
|
+
transition('rotateLeft => void', [
|
|
47
|
+
animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }))
|
|
48
|
+
]),
|
|
49
|
+
transition('void => rotateLeft', [
|
|
50
|
+
style({ transform: 'scale(1, 1) rotate(-90deg)', opacity: '0' }),
|
|
51
|
+
animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
|
|
52
|
+
]),
|
|
53
|
+
transition('rotateRight => void', [
|
|
54
|
+
animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }))
|
|
55
|
+
]),
|
|
56
|
+
transition('void => rotateRight', [
|
|
57
|
+
style({ transform: 'scale(1, 1) rotate(90deg)', opacity: '0' }),
|
|
58
|
+
animate('500ms ease-in-out', style({ transform: 'scale(1, 1) rotate(0deg)', opacity: '1' }))
|
|
59
|
+
]),
|
|
60
|
+
transition('zoom => void', [
|
|
61
|
+
animate('500ms ease-in-out', style({ transform: 'scale(2.5,2.5)', opacity: '0' }))
|
|
62
|
+
]),
|
|
63
|
+
transition('void => zoom', [
|
|
64
|
+
style({ transform: 'scale(2.5,2.5)', opacity: '0' }),
|
|
65
|
+
animate('500ms ease-in-out', style({ transform: 'scale(1, 1)', opacity: '1' }))
|
|
66
|
+
]),
|
|
67
|
+
]),
|
|
68
|
+
],
|
|
69
|
+
standalone: false
|
|
82
70
|
})
|
|
83
71
|
export class NgxGalleryImageComponent implements OnInit, OnChanges {
|
|
84
72
|
@Input() images: NgxGalleryOrderedImage[];
|
|
@@ -123,6 +111,7 @@ export class NgxGalleryImageComponent implements OnInit, OnChanges {
|
|
|
123
111
|
@Input() size: string;
|
|
124
112
|
@Input() arrowPrevIcon: string;
|
|
125
113
|
@Input() arrowNextIcon: string;
|
|
114
|
+
@Input() arrowIconSize: number;
|
|
126
115
|
@Input() autoPlay: boolean;
|
|
127
116
|
@Input() autoPlayInterval: number;
|
|
128
117
|
@Input() autoPlayPauseOnHover: boolean;
|
|
@@ -145,14 +134,11 @@ export class NgxGalleryImageComponent implements OnInit, OnChanges {
|
|
|
145
134
|
private timer;
|
|
146
135
|
|
|
147
136
|
constructor(private sanitization: DomSanitizer, private changeDetectorRef: ChangeDetectorRef,
|
|
148
|
-
|
|
137
|
+
private elementRef: ElementRef, private helperService: NgxGalleryService) {
|
|
149
138
|
this.changeDetectorRef = changeDetectorRef;
|
|
150
139
|
this.action = 'none';
|
|
151
140
|
}
|
|
152
141
|
|
|
153
|
-
// @HostBinding('style.display') public display = 'inline-block';
|
|
154
|
-
// @HostBinding('style.background-color') public color = 'lime';
|
|
155
|
-
|
|
156
142
|
ngOnInit() {
|
|
157
143
|
if (this.arrows && this.arrowsAutoHide) {
|
|
158
144
|
this.arrows = false;
|
|
@@ -69,6 +69,8 @@ export interface INgxGalleryOptions {
|
|
|
69
69
|
previewBullets?: boolean;
|
|
70
70
|
arrowPrevIcon?: string;
|
|
71
71
|
arrowNextIcon?: string;
|
|
72
|
+
arrowIconSize?: number;
|
|
73
|
+
arrowIconThumbnailSize?: number;
|
|
72
74
|
closeIcon?: string;
|
|
73
75
|
fullscreenIcon?: string;
|
|
74
76
|
spinnerIcon?: string;
|
|
@@ -145,6 +147,8 @@ export class NgxGalleryOptions implements INgxGalleryOptions {
|
|
|
145
147
|
previewBullets?: boolean;
|
|
146
148
|
arrowPrevIcon?: string;
|
|
147
149
|
arrowNextIcon?: string;
|
|
150
|
+
arrowIconSize?: number;
|
|
151
|
+
arrowIconThumbnailSize?: number;
|
|
148
152
|
closeIcon?: string;
|
|
149
153
|
fullscreenIcon?: string;
|
|
150
154
|
spinnerIcon?: string;
|
|
@@ -238,6 +242,8 @@ export class NgxGalleryOptions implements INgxGalleryOptions {
|
|
|
238
242
|
|
|
239
243
|
this.arrowPrevIcon = use(obj.arrowPrevIcon, 'fa fa-arrow-circle-left');
|
|
240
244
|
this.arrowNextIcon = use(obj.arrowNextIcon, 'fa fa-arrow-circle-right');
|
|
245
|
+
this.arrowIconSize = use(obj.arrowIconSize, 32);
|
|
246
|
+
this.arrowIconThumbnailSize = use(obj.arrowIconThumbnailSize, 24);
|
|
241
247
|
this.closeIcon = use(obj.closeIcon, 'fa fa-times-circle');
|
|
242
248
|
this.fullscreenIcon = use(obj.fullscreenIcon, 'fa fa-arrows-alt');
|
|
243
249
|
this.spinnerIcon = use(obj.spinnerIcon, 'fa fa-spinner fa-pulse fa-3x fa-fw');
|
|
@@ -1,66 +1,117 @@
|
|
|
1
1
|
@if (arrows) {
|
|
2
|
-
<ngx-gallery-arrows
|
|
3
|
-
|
|
2
|
+
<ngx-gallery-arrows
|
|
3
|
+
(prevClick)="showPrev()"
|
|
4
|
+
(nextClick)="showNext()"
|
|
5
|
+
[prevDisabled]="!canShowPrev()"
|
|
6
|
+
[nextDisabled]="!canShowNext()"
|
|
7
|
+
[arrowPrevIcon]="arrowPrevIcon"
|
|
8
|
+
[arrowNextIcon]="arrowNextIcon"
|
|
9
|
+
[arrowIconSize]="arrowIconSize">
|
|
10
|
+
</ngx-gallery-arrows>
|
|
4
11
|
}
|
|
12
|
+
|
|
5
13
|
<div class="ngx-gallery-preview-top">
|
|
6
14
|
<div class="ngx-gallery-preview-icons">
|
|
7
15
|
@for (action of actions; track action) {
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
<ngx-gallery-action
|
|
17
|
+
[icon]="action.icon"
|
|
18
|
+
[disabled]="action.disabled"
|
|
19
|
+
[titleText]="action.titleText"
|
|
20
|
+
(closeClick)="action.onClick($event, index)"></ngx-gallery-action>
|
|
10
21
|
}
|
|
11
22
|
@if (download && src) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
<a [href]="src" class="ngx-gallery-icon" aria-hidden="true" download>
|
|
24
|
+
<i class="ngx-gallery-icon-content {{ downloadIcon }}"></i>
|
|
25
|
+
</a>
|
|
15
26
|
}
|
|
16
27
|
@if (zoom) {
|
|
17
|
-
|
|
28
|
+
<ngx-gallery-action [icon]="zoomOutIcon" [disabled]="!canZoomOut()" (closeClick)="zoomOut()"></ngx-gallery-action>
|
|
18
29
|
}
|
|
19
30
|
@if (zoom) {
|
|
20
|
-
|
|
31
|
+
<ngx-gallery-action [icon]="zoomInIcon" [disabled]="!canZoomIn()" (closeClick)="zoomIn()"></ngx-gallery-action>
|
|
21
32
|
}
|
|
22
33
|
@if (rotate) {
|
|
23
|
-
|
|
34
|
+
<ngx-gallery-action [icon]="rotateLeftIcon" (closeClick)="rotateLeft()"></ngx-gallery-action>
|
|
24
35
|
}
|
|
25
36
|
@if (rotate) {
|
|
26
|
-
|
|
37
|
+
<ngx-gallery-action [icon]="rotateRightIcon" (closeClick)="rotateRight()"></ngx-gallery-action>
|
|
27
38
|
}
|
|
28
39
|
@if (fullscreen) {
|
|
29
|
-
|
|
30
|
-
|
|
40
|
+
<ngx-gallery-action [icon]="'ngx-gallery-fullscreen ' + fullscreenIcon"
|
|
41
|
+
(closeClick)="manageFullscreen()"></ngx-gallery-action>
|
|
31
42
|
}
|
|
32
43
|
<ngx-gallery-action [icon]="'ngx-gallery-close ' + closeIcon" (closeClick)="close()"></ngx-gallery-action>
|
|
33
44
|
</div>
|
|
34
45
|
</div>
|
|
46
|
+
|
|
35
47
|
<div class="ngx-spinner-wrapper ngx-gallery-center" [class.ngx-gallery-active]="showSpinner">
|
|
36
48
|
<i class="ngx-gallery-icon ngx-gallery-spinner {{spinnerIcon}}" aria-hidden="true"></i>
|
|
37
49
|
</div>
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
class="ngx-gallery-preview-wrapper"
|
|
53
|
+
(click)="onWrapperClick($event)"
|
|
54
|
+
>
|
|
40
55
|
<div class="ngx-gallery-preview-img-wrapper">
|
|
41
56
|
@if (src && type === 'image') {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
57
|
+
<img
|
|
58
|
+
#previewImage
|
|
59
|
+
class="ngx-gallery-preview-img ngx-gallery-center"
|
|
60
|
+
[src]="src"
|
|
61
|
+
(click)="$event.stopPropagation()"
|
|
62
|
+
(mouseenter)="imageMouseEnter()"
|
|
63
|
+
(mouseleave)="imageMouseLeave()"
|
|
64
|
+
(mousedown)="mouseDownHandler($event)"
|
|
65
|
+
(mousemove)="mouseMoveHandler($event)"
|
|
66
|
+
(mouseup)="mouseUpHandler($event)"
|
|
67
|
+
(touchstart)="mouseDownHandler($event)"
|
|
68
|
+
(touchmove)="mouseMoveHandler($event)"
|
|
69
|
+
(touchend)="mouseUpHandler($event)"
|
|
70
|
+
[class.ngx-gallery-active]="!loading"
|
|
71
|
+
[class.animation]="animation"
|
|
72
|
+
[class.ngx-gallery-grab]="canDragOnZoom()"
|
|
73
|
+
[style.transform]="getTransform()"
|
|
74
|
+
[style.left]="positionLeft + 'px'"
|
|
75
|
+
[style.top]="positionTop + 'px'"
|
|
76
|
+
/>
|
|
47
77
|
}
|
|
78
|
+
|
|
48
79
|
@if (src && type === 'video') {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
80
|
+
<video
|
|
81
|
+
#previewImage
|
|
82
|
+
controls
|
|
83
|
+
style="width: 100%; height: 100%;"
|
|
84
|
+
class="ngx-gallery-preview-img ngx-gallery-center"
|
|
85
|
+
(click)="$event.stopPropagation()"
|
|
86
|
+
(mouseenter)="imageMouseEnter()"
|
|
87
|
+
(mouseleave)="imageMouseLeave()"
|
|
88
|
+
(mousedown)="mouseDownHandler($event)"
|
|
89
|
+
(mousemove)="mouseMoveHandler($event)"
|
|
90
|
+
(mouseup)="mouseUpHandler($event)"
|
|
91
|
+
(touchstart)="mouseDownHandler($event)"
|
|
92
|
+
(touchmove)="mouseMoveHandler($event)"
|
|
93
|
+
(touchend)="mouseUpHandler($event)"
|
|
94
|
+
[class.ngx-gallery-active]="!loading"
|
|
95
|
+
[class.animation]="animation"
|
|
96
|
+
[class.ngx-gallery-grab]="canDragOnZoom()"
|
|
97
|
+
[style.transform]="getTransform()"
|
|
98
|
+
[style.left]="positionLeft + 'px'"
|
|
99
|
+
[style.top]="positionTop + 'px'">
|
|
100
|
+
<source [src]="src">
|
|
101
|
+
Your browser does not support the video tag.
|
|
102
|
+
</video>
|
|
57
103
|
}
|
|
104
|
+
|
|
58
105
|
@if (bullets) {
|
|
59
|
-
|
|
60
|
-
|
|
106
|
+
<ngx-gallery-bullets
|
|
107
|
+
[count]="images.length"
|
|
108
|
+
[active]="index"
|
|
109
|
+
(bulletChange)="showAtIndex($event)">
|
|
110
|
+
</ngx-gallery-bullets>
|
|
61
111
|
}
|
|
62
112
|
</div>
|
|
113
|
+
|
|
63
114
|
@if (showDescription && description) {
|
|
64
|
-
|
|
115
|
+
<div class="ngx-gallery-preview-text" [innerHTML]="description" (click)="$event.stopPropagation()"></div>
|
|
65
116
|
}
|
|
66
|
-
</div>
|
|
117
|
+
</div>
|