imagesHolder Property

Summary

The HTML Element to use for temporary image loading, when necessary.

Syntax
TypeScript
JavaScript
Object.defineProperty(ImageLoader.prototype, 'imagesHolder', 
	get: function(), 
	set: function(value) 
) 
imagesHolder: HTMLElement; 

Property Value

The HTML Element to use for temporary image loading. The default value is null.

Remarks

When loading an SVG-as-IMG (meaning loading an SVG image by url with ImageLoaderUrlMode.ImageUrl in an HTMLImageElement), the width and height of the image may not be immediately available from the browser. In this case, the loaded image is appended to the DOM as a child of ImagesHolder before Done is called. Appending this type of image to the DOM assists in making the width and height available. When the width and height have been computed, Done is fired with Width and Height available as always.

One ImagesHolder can be used for many ImageLoader instances.

When all Done event callbacks have been run, internal code may remove the Element from the ImagesHolder if it still exists there. This should be of no concern to the application or developer; as per the rules of the HTML DOM, the Element is removed from the ImagesHolder automatically when it is appended somewhere else.

It is recommended to use an ImagesHolder element that has styles applied making it invisible to the page:

.my-app-images-holder { 
   visibility: hidden; 
} 

However, the ImagesHolder should not have display: none, as this may prevent proper computation of width and height.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly