-
-

+
+

-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/imaging/umb-image-thumbnail.html b/src/Umbraco.Web.UI.Client/src/views/directives/imaging/umb-image-thumbnail.html
index fe7e299648..765787b48e 100644
--- a/src/Umbraco.Web.UI.Client/src/views/directives/imaging/umb-image-thumbnail.html
+++ b/src/Umbraco.Web.UI.Client/src/views/directives/imaging/umb-image-thumbnail.html
@@ -1,5 +1,4 @@
-

+ ng-style="{height: height, width: width, overflow: 'hidden', position: 'relative'}">
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js
new file mode 100644
index 0000000000..68b99efd33
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.controller.js
@@ -0,0 +1,57 @@
+//this controller simply tells the dialogs service to open a mediaPicker window
+//with a specified callback, this callback will receive an object with a selection on it
+angular.module('umbraco').controller("Umbraco.PropertyEditors.ImageCropperController",
+ function($rootScope, $scope, mediaHelper, $timeout, editorState) {
+
+ //check the pre-values for multi-picker
+ var multiPicker = $scope.model.config.multiPicker !== '0' ? true : false;
+
+ //used to reference the part of the data we will either crop or "point"
+ $scope.currentCrop = undefined;
+ $scope.currentPoint = undefined;
+
+ var imgPath = mediaHelper.getImagePropertyValue({imageModel: editorState.current});
+
+ $scope.crop = function(crop){
+ $scope.currentCrop = crop;
+ $scope.currentPoint = undefined;
+ };
+
+ $scope.done = function(){
+ $scope.currentCrop = undefined;
+ $scope.currentPoint = undefined;
+ };
+
+
+ //Data sample
+ if(!$scope.model.value){
+ $scope.model.value = {
+ //image to crops
+ src: imgPath,
+
+ //global intrestpoint, used if no crop is specified
+ center: {left: 0.5, top: 0.4},
+ crops:{
+ thumbnail:
+ {
+ //crop dimensions
+ width: 100,
+ height: 100,
+
+ //crops in percentages
+ crop:{
+ "x1": 0.31731772342645215,
+ "y1": 0.17420325244997603,
+ "x2": -0.36246473116627076,
+ "y2": -0.30226197981593617
+ }
+ },
+ highrise:
+ {
+ width: 90,
+ height: 340
+ }
+ }
+ };
+ }
+});
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html
new file mode 100644
index 0000000000..6081e9fb6e
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/imagecropper/imagecropper.html
@@ -0,0 +1,46 @@
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
index 7ecf0a4b9a..5a0cdc9fc9 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js
@@ -11,7 +11,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
//Data sample
var __img = {
//image to crop
- src: "assets/img/mocks/image.jpg",
+ src: "assets/img/mocks/big-image.jpg",
//global gravity, used if not crop is specified
gravity: {left: 0.5, top: 0.4},
@@ -20,8 +20,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
thumbnail:
{
//crop dimensions
- width: "30px",
- height: "40px",
+ width: 100,
+ height: 100,
//crops in percentages
crop:{ "left": 0.31731772342645215,
@@ -33,8 +33,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
banner:
{
- width: "200px",
- height: "20px",
+ width: 340,
+ height: 90,
crop:{ "left": 0.31731772342645215,
"top": 0.17420325244997603,
@@ -45,8 +45,8 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
highrise:
{
- width: "20px",
- height: "200px"
+ width: 90,
+ height: 340
},
}
};
@@ -81,7 +81,6 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
$scope.edit = function(image){
$scope.currentImage = image;
-
$scope.cropper.image = __img;
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html
index 9e31aadddb..b95b4a6258 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.html
@@ -1,35 +1,38 @@