Available size change detection modes for the property sizeChangedDetection.
Remarks
Since there is no size changed event in HTML, CanvasComponent comes with its own methods to detect whether the size of its div element has changed. This is needed to update its size accordingly.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.SizeChangedDetectionMode
See Also
Constants
No size change detection.
Remarks
Consequently, no SizeChanged events are fired.
Size change detection based on the native ResizeObserver
API or invisible sensor elements.
Remarks
This setting feature detects if the ResizeObserver
API is available on the client and uses invisible sensor elements as fallback.
This is the preferred mode since it provides SizeChanged events in real time.
Timer based size change detection.
Remarks
A timer periodically checks the current size with the previous one. Typically, this method is used as fall back in case the SENSOR mode is not available in a browser.
Static Methods
Converts the argument to SizeChangedDetectionMode.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - SizeChangedDetectionMode
- The value to convert to SizeChangedDetectionMode.
Returns
- ↪SizeChangedDetectionMode
- Either
value
if it is already a SizeChangedDetectionMode or an appropriate converted value.