function MarginControlContainer(
      documentInfo, marginsTypeTicketItem, customMarginsTicketItem,
      measurementSystem, dragChangedCallback) {
    print_preview.Component.call(this);

    /**
     * Document data model.
     * @type {!print_preview.DocumentInfo}
     * @private
     */
    this.documentInfo_ = documentInfo;

    /**
     * Margins type ticket item used to read predefined margins type.
     */
    this.marginsTypeTicketItem_ = marginsTypeTicketItem;

    /**
     * Custom margins ticket item used to read/write custom margin values.
     * @type {!print_preview.ticket_items.CustomMargins}
     * @private
     */
    this.customMarginsTicketItem_ = customMarginsTicketItem;

    /**
     * Used to convert between the system's local units and points.
     * @type {!print_preview.MeasurementSystem}
     * @private
     */
    this.measurementSystem_ = measurementSystem;

    /**
     * Called in response to dragging the margins starting or stopping. True is
     * passed to the function if the margin is currently being dragged and false
     * otherwise.
     * @type {function(boolean)}
     * @private
     */
    this.dragChangedCallback_ = dragChangedCallback;

    /**
     * Convenience array that contains all of the margin controls.
     * @type {!Object<
     *     !print_preview.ticket_items.CustomMarginsOrientation,
     *     !print_preview.MarginControl>}
     * @private
     */
    this.controls_ = {};
    for (const key in print_preview.ticket_items.CustomMarginsOrientation) {
      const orientation =
          print_preview.ticket_items.CustomMarginsOrientation[key];
      const control = new print_preview.MarginControl(orientation);
      this.controls_[orientation] = control;
      this.addChild(control);
    }

    /**
     * Margin control currently being dragged. Null if no control is being
     * dragged.
     * @type {print_preview.MarginControl}
     * @private
     */
    this.draggedControl_ = null;

    /**
     * Translation transformation in pixels to translate from the origin of the
     * custom margins component to the top-left corner of the most visible
     * preview page.
     * @type {!print_preview.Coordinate2d}
     * @private
     */
    this.translateTransform_ = new print_preview.Coordinate2d(0, 0);

    /**
     * Scaling transformation to scale from pixels to the units which the
     * print preview is in. The scaling factor is the same in both dimensions,
     * so this field is just a single number.
     * @type {number}
     * @private
     */
    this.scaleTransform_ = 1;

    /**
     * Clipping size for clipping the margin controls.
     * @type {print_preview.Size}
     * @private
     */
    this.clippingSize_ = null;
  }
/**
   * UI component used for setting custom print margins.
   * @param {!print_preview.DocumentInfo} documentInfo Document data model.
   * @param {!print_preview.ticket_items.MarginsType} marginsTypeTicketItem
   *     Used to read margins type.
   * @param {!print_preview.ticket_items.CustomMargins} customMarginsTicketItem
   *     Used to read and write custom margin values.
   * @param {!print_preview.MeasurementSystem} measurementSystem Used to convert
   *     between the system's local units and points.
   * @param {function(boolean)} dragChangedCallback A function which is called
   *     when dragging margins starts or stops. True is passed to the function
   *     if the margin is currently being dragged and false otherwise.
   * @constructor
   * @extends {print_preview.Component}
   */
UI component used for setting custom print margins.
UI component used for setting custom print margins .
function MarginControlContainer(
      documentInfo, marginsTypeTicketItem, customMarginsTicketItem,
      measurementSystem, dragChangedCallback) {
    print_preview.Component.call(this);
    this.documentInfo_ = documentInfo;
    this.marginsTypeTicketItem_ = marginsTypeTicketItem;
    this.customMarginsTicketItem_ = customMarginsTicketItem;
    this.measurementSystem_ = measurementSystem;
    this.dragChangedCallback_ = dragChangedCallback;
    this.controls_ = {};
    for (const key in print_preview.ticket_items.CustomMarginsOrientation) {
      const orientation =
          print_preview.ticket_items.CustomMarginsOrientation[key];
      const control = new print_preview.MarginControl(orientation);
      this.controls_[orientation] = control;
      this.addChild(control);
    }
    this.draggedControl_ = null;
    this.translateTransform_ = new print_preview.Coordinate2d(0, 0);
    this.scaleTransform_ = 1;
    this.clippingSize_ = null;
  }
function MarginControlContainer ( documentInfo , marginsTypeTicketItem , customMarginsTicketItem , measurementSystem , dragChangedCallback ) { print_preview . Component . call ( this ) ; this . documentInfo_ = documentInfo ; this . marginsTypeTicketItem_ = marginsTypeTicketItem ; this . customMarginsTicketItem_ = customMarginsTicketItem ; this . measurementSystem_ = measurementSystem ; this . dragChangedCallback_ = dragChangedCallback ; this . controls_ = { } ; for ( const key in print_preview . ticket_items . CustomMarginsOrientation ) { const orientation = print_preview . ticket_items . CustomMarginsOrientation [ key ] ; const control = new print_preview . MarginControl ( orientation ) ; this . controls_ [ orientation ] = control ; this . addChild ( control ) ; } this . draggedControl_ = null ; this . translateTransform_ = new print_preview . Coordinate2d ( 0 , 0 ) ; this . scaleTransform_ = 1 ; this . clippingSize_ = null ; }
UI component used for setting custom print margins.
UI component used for setting custom print margins .
/**
     * Document data model.
     * @type {!print_preview.DocumentInfo}
     * @private
     */ /**
     * Margins type ticket item used to read predefined margins type.
     */ /**
     * Custom margins ticket item used to read/write custom margin values.
     * @type {!print_preview.ticket_items.CustomMargins}
     * @private
     */ /**
     * Used to convert between the system's local units and points.
     * @type {!print_preview.MeasurementSystem}
     * @private
     */ /**
     * Called in response to dragging the margins starting or stopping. True is
     * passed to the function if the margin is currently being dragged and false
     * otherwise.
     * @type {function(boolean)}
     * @private
     */ /**
     * Convenience array that contains all of the margin controls.
     * @type {!Object<
     *     !print_preview.ticket_items.CustomMarginsOrientation,
     *     !print_preview.MarginControl>}
     * @private
     */ /**
     * Margin control currently being dragged. Null if no control is being
     * dragged.
     * @type {print_preview.MarginControl}
     * @private
     */ /**
     * Translation transformation in pixels to translate from the origin of the
     * custom margins component to the top-left corner of the most visible
     * preview page.
     * @type {!print_preview.Coordinate2d}
     * @private
     */ /**
     * Scaling transformation to scale from pixels to the units which the
     * print preview is in. The scaling factor is the same in both dimensions,
     * so this field is just a single number.
     * @type {number}
     * @private
     */ /**
     * Clipping size for clipping the margin controls.
     * @type {print_preview.Size}
     * @private
     */