function ResizeHandles(eventBus, canvas, selection, resize) {

  this._resize = resize;
  this._canvas = canvas;

  var self = this;

  eventBus.on('selection.changed', function(e) {
    var newSelection = e.newSelection;

    // remove old selection markers
    self.removeResizers();

    // add new selection markers ONLY if single selection
    if (newSelection.length === 1) {
      forEach(newSelection, self.addResizer, self);
    }
  });

  eventBus.on('shape.changed', function(e) {
    var shape = e.element;

    if (selection.isSelected(shape)) {
      self.removeResizers();

      self.addResizer(shape);
    }
  });
}
/**
 * This component is responsible for adding resize handles.
 *
 * @param {EventBus} eventBus
 * @param {Canvas} canvas
 * @param {Selection} selection
 * @param {Resize} resize
 */
This component is responsible for adding resize handles.
This component is responsible for adding resize handles .
function ResizeHandles(eventBus, canvas, selection, resize) {
  this._resize = resize;
  this._canvas = canvas;
  var self = this;
  eventBus.on('selection.changed', function(e) {
    var newSelection = e.newSelection;
    self.removeResizers();
    if (newSelection.length === 1) {
      forEach(newSelection, self.addResizer, self);
    }
  });
  eventBus.on('shape.changed', function(e) {
    var shape = e.element;
    if (selection.isSelected(shape)) {
      self.removeResizers();
      self.addResizer(shape);
    }
  });
}
function ResizeHandles ( eventBus , canvas , selection , resize ) { this . _resize = resize ; this . _canvas = canvas ; var self = this ; eventBus . on ( 'selection.changed' , function ( e ) { var newSelection = e . newSelection ; self . removeResizers ( ) ; if ( newSelection . length === 1 ) { forEach ( newSelection , self . addResizer , self ) ; } } ) ; eventBus . on ( 'shape.changed' , function ( e ) { var shape = e . element ; if ( selection . isSelected ( shape ) ) { self . removeResizers ( ) ; self . addResizer ( shape ) ; } } ) ; }
This component is responsible for adding resize handles.
This component is responsible for adding resize handles .
// remove old selection markers // add new selection markers ONLY if single selection