function PopupMenu(config, eventBus, canvas, search) {
  this._eventBus = eventBus;
  this._canvas = canvas;
  this._search = search;

  this._current = null;

  var scale = isDefined(config && config.scale) ? config.scale : {
    min: 1,
    max: 1
  };

  this._config = {
    scale: scale
  };


  eventBus.on('diagram.destroy', () => {
    this.close();
  });

  eventBus.on('element.changed', event => {

    const element = this.isOpen() && this._current.target;

    if (event.element === element) {
      this.refresh();
    }
  });

}
A popup menu to show a number of actions on the canvas.

@param {PopupMenuConfig} config
@param {EventBus} eventBus
@param {Canvas} canvas
@param {search} search