diff --git a/module/field.js b/module/field.js index f009756..6efdddc 100644 --- a/module/field.js +++ b/module/field.js @@ -329,7 +329,7 @@ export class FileField { const {transforms} = imageEditor const {previewDataURI} = imageEditor - previewDataURI.then((dataURI) => { + previewDataURI.then(([dataURI, sizeInfo]) => { // Set the preview image this._viewer.imageURL = dataURI diff --git a/module/ui/crop-tool.js b/module/ui/crop-tool.js index f2c9d29..972c6d1 100644 --- a/module/ui/crop-tool.js +++ b/module/ui/crop-tool.js @@ -329,8 +329,8 @@ export class CropTool { point[1], maxRect[1][1] - point[1] ) - maxRect[0][1] = (point[1] - distanceToEdge) - maxRect[1][1] = (point[1] + distanceToEdge) + maxRect[0][1] = point[1] - distanceToEdge + maxRect[1][1] = point[1] + distanceToEdge } // @@ Why does vert work but not horz diff --git a/module/ui/gallery-item.js b/module/ui/gallery-item.js index f71d122..eb52545 100644 --- a/module/ui/gallery-item.js +++ b/module/ui/gallery-item.js @@ -166,7 +166,7 @@ export class GalleryItem { const {transforms} = imageEditor const {previewDataURI} = imageEditor - previewDataURI.then((dataURI) => { + previewDataURI.then(([dataURI, sizeInfo]) => { // Set the preview image this._viewer.imageURL = dataURI diff --git a/module/ui/image-editor.js b/module/ui/image-editor.js index f2bd381..6746d63 100644 --- a/module/ui/image-editor.js +++ b/module/ui/image-editor.js @@ -197,14 +197,14 @@ export class ImageEditor extends Overlay { resizeCanvas.height ) - resolve( + resolve([ resizeCanvas.toDataURL(), { 'width': resizeCanvas.width, 'height': resizeCanvas.height, 'maxWidth': cropCanvas.width } - ) + ]) } }) } diff --git a/package-lock.json b/package-lock.json index b0be35b..afc5b86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "manhattan-assets", - "version": "1.0.0-alpha.2", + "version": "1.0.0-beta.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b8a243a..5fd342a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "manhattan-assets", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "description": "File and image uploads for forms.", "engines": { "node": ">=8.9.4"