P5-1417: Dragbar and rulers should work with inches

This commit is contained in:
Ruslan Getmansky
2017-06-21 15:08:20 +03:00
parent 2b4bb8ba37
commit e79245e14e
4 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -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;
};