documentationfor yFiles for HTML 3.0.0.2

ImageNodeStyle

A node style that can use an image for the visual representation of a node.

Inheritance Hierarchy
ImageNodeStyle
Implemented Interfaces

Remarks

It can be configured to keep the image's aspect ratio. An optional normalizedOutline can be defined to refine hit testing and edge cropping behavior.

Examples

const node = graph.createNode(
  [0, 0, 50, 50],
  new ImageNodeStyle({
    // path to the image or data URI which should be referenced in the SVGImageElement
    href: './resources/my-image.png',
  }),
)

Type Details

yFiles module
view

See Also

Constructors

Properties

Methods

Static Methods