Create Palette with custom update function

Hi,

when setting up your CustomPalette (following along the example) you can override the _update function:

...

export default class CustomPalette {
  constructor(create, elementFactory, palette, translate) {
    this.create = create;
    this.elementFactory = elementFactory;
    this.translate = translate;

    palette.registerProvider(this);

    palette._update = function () {
      // ...
    }
  }

  getPaletteEntries(element) {
    // ...
  }
}

...

Also see this thread.

1 Like