diff --git a/kahuna/public/js/image/controller.js b/kahuna/public/js/image/controller.js index 47a8ecbb16..dc62462903 100644 --- a/kahuna/public/js/image/controller.js +++ b/kahuna/public/js/image/controller.js @@ -297,7 +297,7 @@ image.controller('ImageCtrl', [ } ctrl.crop = crops.find(crop => crop.id === cropKey); ctrl.fullCrop = crops.find(crop => crop.specification.type === 'full'); - ctrl.crops = crops.filter(crop => crop.specification.type === 'crop'); + ctrl.crops = crops.filter(crop => crop.specification.type === 'crop' || 'poi'); ctrl.image.allCrops = ctrl.fullCrop ? [ctrl.fullCrop].concat(ctrl.crops) : ctrl.crops; //boolean version for use in template ctrl.hasFullCrop = angular.isDefined(ctrl.fullCrop); diff --git a/kahuna/public/js/services/api/media-cropper.js b/kahuna/public/js/services/api/media-cropper.js index d49cfe1fd4..c78d9bdba7 100644 --- a/kahuna/public/js/services/api/media-cropper.js +++ b/kahuna/public/js/services/api/media-cropper.js @@ -16,9 +16,9 @@ cropperApi.factory('mediaCropper', ['mediaApi', function(mediaApi) { return cropperRoot; } - function createCrop(image, coords, ratio) { + function createCrop(image, coords, ratio, type = 'crop') { return getCropperRoot().follow('crop').post({ - type: 'crop', + type, source: image.uri, x: coords.x, y: coords.y, diff --git a/kahuna/public/js/util/constants/cropOptions.js b/kahuna/public/js/util/constants/cropOptions.js index 017ec87522..90bb419c0e 100644 --- a/kahuna/public/js/util/constants/cropOptions.js +++ b/kahuna/public/js/util/constants/cropOptions.js @@ -4,5 +4,6 @@ export const portrait = {key: 'portrait', ratio: 4 / 5, ratioString: '4:5'}; export const video = {key: 'video', ratio: 16 / 9, ratioString: '16:9'}; export const square = {key: 'square', ratio: 1, ratioString: '1:1'}; export const freeform = {key: 'freeform', ratio: null}; +export const pointsOfInterestBeta = {key: 'points of interest ᴮᴱᵀᴬ', ratio:null}; -export const cropOptions = [landscape, portrait, video, square, freeform]; +export const cropOptions = [landscape, portrait, video, square, freeform, pointsOfInterestBeta];