GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • @maxgraph/core

This view

  • Original page
  • New address

GeezerVison is showing maxgraph.github.io — ImageBundlePlugin | @maxgraph/core

  • ImageBundlePlugin

Class ImageBundlePlugin

A plugin that manages ImageBundle instances for the graph.

Image bundles map keys to image URLs (or data URIs). The keys can then be referenced in any cell style via CellStateStyle.image.

AbstractGraph.postProcessCellStyle (defined in CellsMixin) delegates bundle key resolution to this plugin: when registered, a style.image that matches a bundle key is replaced with the underlying URL/data URI; when this plugin is NOT registered (for instance on a BaseGraph without explicit opt-in), the bundle lookup is silently skipped and the raw style.image key is used as the image path.

Since

0.24.0

Implements

  • GraphPlugin
  • Defined in view/plugin/ImageBundlePlugin.ts:35
Index

Constructors

constructor

Properties

pluginId

Methods

addImageBundle getImageFromBundles onDestroy removeImageBundle

Constructors

constructor

  • new ImageBundlePlugin(graph: AbstractGraph): ImageBundlePlugin

    Constructs the plugin that manages image bundles.

    Parameters

    • graph: AbstractGraph

      Reference to the enclosing AbstractGraph. Accepted to conform with the GraphPluginConstructor contract; not retained because this plugin does not interact with the graph directly.

    Returns ImageBundlePlugin

    • Defined in view/plugin/ImageBundlePlugin.ts:51

Properties

Static ReadonlypluginId

pluginId: "image-bundle" = 'image-bundle'
  • Defined in view/plugin/ImageBundlePlugin.ts:36

Methods

addImageBundle

  • addImageBundle(bundle: ImageBundle): void

    Adds the specified ImageBundle.

    Parameters

    • bundle: ImageBundle

    Returns void

    • Defined in view/plugin/ImageBundlePlugin.ts:56

getImageFromBundles

  • getImageFromBundles(key: string): string | null

    Searches all imageBundles for the specified key and returns the value for the first match or null if the key is not found.

    Parameters

    • key: string

    Returns string | null

    • Defined in view/plugin/ImageBundlePlugin.ts:71

onDestroy

  • onDestroy(): void

    Releases the registered bundles to help garbage collection.

    Returns void

    Implementation of GraphPlugin.onDestroy

    • Defined in view/plugin/ImageBundlePlugin.ts:84

removeImageBundle

  • removeImageBundle(bundle: ImageBundle): void

    Removes all occurrences of the specified ImageBundle.

    Parameters

    • bundle: ImageBundle

    Returns void

    • Defined in view/plugin/ImageBundlePlugin.ts:63

Settings

Member Visibility
  • Protected
  • Inherited
Theme

On This Page

Constructors
constructor
Properties
pluginId
Methods
addImageBundlegetImageFromBundlesonDestroyremoveImageBundle
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.