// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-'use strict';
-
/**
* Crop mode.
*
*/
ImageEditor.Mode.Crop.prototype.createDefaultCrop = function() {
var rect = this.getViewport().screenToImageRect(
- new Rect(this.getViewport().getImageBoundsOnScreenClipped()));
+ new ImageRect(this.getViewport().getImageBoundsOnScreenClipped()));
rect = rect.inflate(
-Math.round(rect.width / 6), -Math.round(rect.height / 6));
this.cropRect_ = new DraggableRect(rect, this.getViewport());
/**
* A draggable rectangle over the image.
*
- * @param {Rect} rect Initial size of the image.
+ * @param {ImageRect} rect Initial size of the image.
* @param {Viewport} viewport Viewport.
* @constructor
*/
/**
* Obtains the geometry of the rectangle.
- * @return {Rect} Geometry of the rectangle.
+ * @return {ImageRect} Geometry of the rectangle.
*/
DraggableRect.prototype.getRect = function() {
- return new Rect(this.bounds_);
+ return new ImageRect(this.bounds_);
};
/**