P5-1417: Dragbar and rulers should work with inches
This commit is contained in:
@@ -76,12 +76,13 @@ function ImageEditor(canvasId, args) {
|
||||
* Crops image to desired dimensions
|
||||
* @param {int} width [description]
|
||||
* @param {int} height [description]
|
||||
* @param {string} units cm|inch
|
||||
* @return {ImageEditor}
|
||||
*/
|
||||
this.crop = function (width, height) {
|
||||
this.crop = function (width, height, units) {
|
||||
_canvas.getImage().__cropped = false;
|
||||
_canvas.getImageData().removeCropData();
|
||||
_canvas.getViewport().set(width, height);
|
||||
_canvas.getViewport().set(width, height, units);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user