element property

HTMLElement? element

Gets or sets the Picture's HTML element that provides some kind of visual image.

The default value is null. This can be a HTMLImageElement, HTMLVideoElement, or HTMLCanvasElement. If an image, this element must have its source (src) attribute defined. Setting this does not set the Picture#source attribute and that attribute may be unknowable.

If this property is set to an HTMLImageElement, and that element is not yet loaded before it is used, the Diagrams using that Element will not redraw on their own. You must call #redraw after the image is finished loading if you wish for the Diagram to be updated immediately.

Implementation

_i6.HTMLElement? get element => _i4.getProperty(
      this,
      'element',
    );
void element=(HTMLElement? value)

Implementation

set element(_i6.HTMLElement? value) {
  _i4.setProperty(
    this,
    'element',
    value ?? _i5.undefined,
  );
}