function MeasurementManager() {
  var cornerstone = _externalModules2.default.cornerstone;
  var that = this;

  that.measurements = [];

  // Adds an element as both a source and a target
  this.add = function (measurement) {
    var index = that.measurements.push(measurement);
    // Fire event
    var eventDetail = {
      index: index,
      measurement: measurement
    };

    (0, _triggerEvent2.default)(cornerstone.events, _events2.default.MEASUREMENT_ADDED, eventDetail);
  };

  this.remove = function (index) {
    var measurement = that.measurements[index];

    that.measurements.splice(index, 1);
    // Fire event
    var eventDetail = {
      index: index,
      measurement: measurement
    };

    (0, _triggerEvent2.default)(cornerstone.events, _events2.default.MEASUREMENT_REMOVED, eventDetail);
  };
}
// This object manages a collection of measurements
This object manages a collection of measurements
This object manages a collection of measurements
function MeasurementManager() {
  var cornerstone = _externalModules2.default.cornerstone;
  var that = this;
  that.measurements = [];
  this.add = function (measurement) {
    var index = that.measurements.push(measurement);
    var eventDetail = {
      index: index,
      measurement: measurement
    };
    (0, _triggerEvent2.default)(cornerstone.events, _events2.default.MEASUREMENT_ADDED, eventDetail);
  };
  this.remove = function (index) {
    var measurement = that.measurements[index];
    that.measurements.splice(index, 1);
    var eventDetail = {
      index: index,
      measurement: measurement
    };
    (0, _triggerEvent2.default)(cornerstone.events, _events2.default.MEASUREMENT_REMOVED, eventDetail);
  };
}
function MeasurementManager ( ) { var cornerstone = _externalModules2 . default . cornerstone ; var that = this ; that . measurements = [ ] ; this . add = function ( measurement ) { var index = that . measurements . push ( measurement ) ; var eventDetail = { index : index , measurement : measurement } ; ( 0 , _triggerEvent2 . default ) ( cornerstone . events , _events2 . default . MEASUREMENT_ADDED , eventDetail ) ; } ; this . remove = function ( index ) { var measurement = that . measurements [ index ] ; that . measurements . splice ( index , 1 ) ; var eventDetail = { index : index , measurement : measurement } ; ( 0 , _triggerEvent2 . default ) ( cornerstone . events , _events2 . default . MEASUREMENT_REMOVED , eventDetail ) ; } ; }
This object manages a collection of measurements
This object manages a collection of measurements
// Adds an element as both a source and a target // Fire event // Fire event