MOBILE-3074 format-text: Add magnifying glass when no height
This commit is contained in:
		
							parent
							
								
									6c0594431d
								
							
						
					
					
						commit
						2aa37308ef
					
				| @ -226,7 +226,6 @@ ion-app.app-root { | ||||
|     user-select: text; | ||||
|     word-break: break-word; | ||||
|     word-wrap: break-word; | ||||
|     white-space: normal; | ||||
| 
 | ||||
|     &[maxHeight], | ||||
|     &[ng-reflect-max-height] { | ||||
|  | ||||
| @ -160,6 +160,7 @@ export class CoreFormatTextDirective implements OnChanges { | ||||
|      */ | ||||
|     addMagnifyingGlasses(): void { | ||||
|         const imgs = Array.from(this.element.querySelectorAll('.core-adapted-img-container > img')); | ||||
|         console.error(this.element, imgs); | ||||
|         if (!imgs.length) { | ||||
|             return; | ||||
|         } | ||||
| @ -198,6 +199,7 @@ export class CoreFormatTextDirective implements OnChanges { | ||||
|                 this.domUtils.viewImage(imgSrc, img.getAttribute('alt'), this.component, this.componentId); | ||||
|             }); | ||||
| 
 | ||||
|             console.error(img.parentNode, anchor); | ||||
|             img.parentNode.appendChild(anchor); | ||||
|         }); | ||||
|     } | ||||
| @ -339,6 +341,9 @@ export class CoreFormatTextDirective implements OnChanges { | ||||
|                 } | ||||
|             } else { | ||||
|                 this.domUtils.moveChildren(div, this.element); | ||||
| 
 | ||||
|                 // Add magnifying glasses to images.
 | ||||
|                 this.addMagnifyingGlasses(); | ||||
|             } | ||||
| 
 | ||||
|             this.element.classList.remove('core-disable-media-adapt'); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user