text: /*globals define, _*/
  /*jshint browser: true, camelcase: false*/
  /**
   * This decorator inherits from the ModelDecorator.DiagramDesignerWidget.
   * With no changes to the methods - it will functions just like the ModelDecorator.
   *
   * For more methods see the ModelDecorator.DiagramDesignerWidget.js in the webgme repository.
   *
   * @author pmeijer / https://github.com/pmeijer
   */
  
  define([
      'js/RegistryKeys',
      'js/Constants',
      'decorators/ModelDecorator/DiagramDesigner/ModelDecorator.DiagramDesignerWidget',
      'jquery',
      'underscore'
  ], function (
      REGISTRY_KEYS,
      CONSTANTS,
      ModelDecoratorDiagramDesignerWidget) {
  
      'use strict';
  
      var openStackDecorator,
          DECORATOR_ID = 'openStackDecorator';
  
      openStackDecorator = function (options) {
          var opts = _.extend({}, options);
  
          ModelDecoratorDiagramDesignerWidget.apply(this, [opts]);
  
          this.logger.debug('openStackDecorator ctor');
      };
  
      openStackDecorator.prototype = Object.create(ModelDecoratorDiagramDesignerWidget.prototype);
      openStackDecorator.prototype.constructor = openStackDecorator;
      openStackDecorator.prototype.DECORATORID = DECORATOR_ID;
  
      openStackDecorator.prototype.on_addTo = function () {
          var client = this._control._client,
              nodeObj = client.getNode(this._metaInfo[CONSTANTS.GME_ID]);
  
          this.logger.debug('This node was added to the canvas', nodeObj);
  
          // Call the base-class method..
          ModelDecoratorDiagramDesignerWidget.prototype.on_addTo.apply(this, arguments);
      };
  
      openStackDecorator.prototype.destroy = function () {
          ModelDecoratorDiagramDesignerWidget.prototype.destroy.apply(this, arguments);
      };
  
      openStackDecorator.prototype.update = function () {
          var client = this._control._client,
              nodeObj = client.getNode(this._metaInfo[CONSTANTS.GME_ID]);
  
          this.logger.debug('This node is on the canvas and received an update event', nodeObj);
  
          ModelDecoratorDiagramDesignerWidget.prototype.update.apply(this, arguments);
      };
  
      return openStackDecorator;
  });