|
40 | 40 | (click)="openImageModal([attachmentContext])" |
41 | 41 | (keyup.enter)="openImageModal([attachmentContext])" |
42 | 42 | [style.--original-height]=" |
43 | | - getImageAttachmentConfiguration( |
| 43 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 44 | + ? getImageAttachmentConfiguration( |
| 45 | + attachmentContext, |
| 46 | + 'single', |
| 47 | + imgElement |
| 48 | + ).originalHeight |
| 49 | + : '' |
| 50 | + " |
| 51 | + [style.--original-width]=" |
| 52 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 53 | + ? getImageAttachmentConfiguration( |
| 54 | + attachmentContext, |
| 55 | + 'single', |
| 56 | + imgElement |
| 57 | + ).originalWidth |
| 58 | + : '' |
| 59 | + " |
| 60 | + [ngStyle]="{ |
| 61 | + '--original-width': getImageAttachmentConfiguration( |
44 | 62 | attachmentContext, |
45 | 63 | 'single', |
46 | 64 | imgElement |
47 | | - ).originalHeight |
48 | | - " |
49 | | - [style.--original-width]=" |
50 | | - getImageAttachmentConfiguration( |
| 65 | + ).originalWidth, |
| 66 | + '--original-height': getImageAttachmentConfiguration( |
51 | 67 | attachmentContext, |
52 | 68 | 'single', |
53 | 69 | imgElement |
54 | | - ).originalWidth |
55 | | - " |
56 | | - [ngStyle]="{ |
| 70 | + ).originalHeight, |
57 | 71 | height: getImageAttachmentConfiguration( |
58 | 72 | attachmentContext, |
59 | 73 | 'single', |
|
118 | 132 | " |
119 | 133 | [alt]="galleryImage.fallback" |
120 | 134 | [style.--original-height]=" |
121 | | - getImageAttachmentConfiguration( |
| 135 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 136 | + ? getImageAttachmentConfiguration( |
| 137 | + galleryImage, |
| 138 | + 'gallery', |
| 139 | + imgElement |
| 140 | + ).originalHeight |
| 141 | + : '' |
| 142 | + " |
| 143 | + [style.--original-width]=" |
| 144 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 145 | + ? getImageAttachmentConfiguration( |
| 146 | + galleryImage, |
| 147 | + 'gallery', |
| 148 | + imgElement |
| 149 | + ).originalWidth |
| 150 | + : '' |
| 151 | + " |
| 152 | + [ngStyle]="{ |
| 153 | + '--original-height': getImageAttachmentConfiguration( |
122 | 154 | galleryImage, |
123 | 155 | 'gallery', |
124 | 156 | imgElement |
125 | | - ).originalHeight |
126 | | - " |
127 | | - [style.--original-width]=" |
128 | | - getImageAttachmentConfiguration( |
| 157 | + ).originalHeight, |
| 158 | + '--original-width': getImageAttachmentConfiguration( |
129 | 159 | galleryImage, |
130 | 160 | 'gallery', |
131 | 161 | imgElement |
132 | | - ).originalWidth |
133 | | - " |
134 | | - [ngStyle]="{ |
| 162 | + ).originalWidth, |
135 | 163 | height: getImageAttachmentConfiguration( |
136 | 164 | galleryImage, |
137 | 165 | 'gallery', |
|
157 | 185 | isSvg(galleryImage) |
158 | 186 | " |
159 | 187 | [style.--original-height]=" |
160 | | - getImageAttachmentConfiguration( |
| 188 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 189 | + ? getImageAttachmentConfiguration( |
| 190 | + galleryImage, |
| 191 | + 'gallery', |
| 192 | + element |
| 193 | + ).originalHeight |
| 194 | + : '' |
| 195 | + " |
| 196 | + [style.--original-width]=" |
| 197 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 198 | + ? getImageAttachmentConfiguration( |
| 199 | + galleryImage, |
| 200 | + 'gallery', |
| 201 | + element |
| 202 | + ).originalWidth |
| 203 | + : '' |
| 204 | + " |
| 205 | + [ngStyle]="{ |
| 206 | + '--original-height': getImageAttachmentConfiguration( |
161 | 207 | galleryImage, |
162 | 208 | 'gallery', |
163 | 209 | element |
164 | | - ).originalHeight |
165 | | - " |
166 | | - [style.--original-width]=" |
167 | | - getImageAttachmentConfiguration( |
| 210 | + ).originalHeight, |
| 211 | + '--original-width': getImageAttachmentConfiguration( |
168 | 212 | galleryImage, |
169 | 213 | 'gallery', |
170 | 214 | element |
171 | | - ).originalWidth |
172 | | - " |
173 | | - [ngStyle]="{ |
| 215 | + ).originalWidth, |
174 | 216 | 'background-image': |
175 | 217 | 'url(' + |
176 | 218 | getImageAttachmentConfiguration( |
|
216 | 258 | class="str-chat__player-wrapper" |
217 | 259 | data-testclass="video-attachment-parent" |
218 | 260 | [style.--original-height]=" |
219 | | - getVideoAttachmentConfiguration(attachmentContext, videoElement) |
220 | | - .originalHeight |
| 261 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 262 | + ? getVideoAttachmentConfiguration( |
| 263 | + attachmentContext, |
| 264 | + videoElement |
| 265 | + ).originalHeight |
| 266 | + : '' |
221 | 267 | " |
222 | 268 | [style.--original-width]=" |
223 | | - getVideoAttachmentConfiguration(attachmentContext, videoElement) |
224 | | - .originalWidth |
| 269 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 270 | + ? getVideoAttachmentConfiguration( |
| 271 | + attachmentContext, |
| 272 | + videoElement |
| 273 | + ).originalWidth |
| 274 | + : '' |
225 | 275 | " |
226 | 276 | [ngStyle]="{ |
| 277 | + '--original-height': getVideoAttachmentConfiguration( |
| 278 | + attachmentContext, |
| 279 | + videoElement |
| 280 | + ).originalHeight, |
| 281 | + '--original-width': getVideoAttachmentConfiguration( |
| 282 | + attachmentContext, |
| 283 | + videoElement |
| 284 | + ).originalWidth, |
227 | 285 | height: getVideoAttachmentConfiguration( |
228 | 286 | attachmentContext, |
229 | 287 | videoElement |
|
477 | 535 | ).url |
478 | 536 | " |
479 | 537 | [style.--original-height]=" |
480 | | - getCarouselImageAttachmentConfiguration( |
481 | | - imagesToView[imagesToViewCurrentIndex], |
482 | | - imgElement |
483 | | - ).originalHeight |
| 538 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 539 | + ? getCarouselImageAttachmentConfiguration( |
| 540 | + imagesToView[imagesToViewCurrentIndex], |
| 541 | + imgElement |
| 542 | + ).originalHeight |
| 543 | + : '' |
484 | 544 | " |
485 | 545 | [style.--original-width]=" |
486 | | - getCarouselImageAttachmentConfiguration( |
487 | | - imagesToView[imagesToViewCurrentIndex], |
488 | | - imgElement |
489 | | - ).originalWidth |
| 546 | + defineOriginalDimensionCSSVariablesIn === 'inlineStyle' |
| 547 | + ? getCarouselImageAttachmentConfiguration( |
| 548 | + imagesToView[imagesToViewCurrentIndex], |
| 549 | + imgElement |
| 550 | + ).originalWidth |
| 551 | + : '' |
490 | 552 | " |
491 | 553 | [alt]="imagesToView[imagesToViewCurrentIndex].fallback" |
492 | 554 | [ngStyle]="{ |
| 555 | + '--original-height': getCarouselImageAttachmentConfiguration( |
| 556 | + imagesToView[imagesToViewCurrentIndex], |
| 557 | + imgElement |
| 558 | + ).originalHeight, |
| 559 | + '--original-width': getCarouselImageAttachmentConfiguration( |
| 560 | + imagesToView[imagesToViewCurrentIndex], |
| 561 | + imgElement |
| 562 | + ).originalWidth, |
493 | 563 | width: getCarouselImageAttachmentConfiguration( |
494 | 564 | imagesToView[imagesToViewCurrentIndex], |
495 | 565 | imgElement |
|
0 commit comments