Fixes issue with grid media without size config
This commit is contained in:
@@ -24,20 +24,20 @@ angular.module("umbraco")
|
||||
};
|
||||
|
||||
$scope.setUrl = function(){
|
||||
|
||||
|
||||
if($scope.control.value.image){
|
||||
var url = $scope.control.value.image;
|
||||
|
||||
if($scope.control.editor.config.size){
|
||||
if($scope.control.editor.config && $scope.control.editor.config.size){
|
||||
url += "?width=" + $scope.control.editor.config.size.width;
|
||||
url += "&height=" + $scope.control.editor.config.size.height;
|
||||
|
||||
if($scope.control.value.focalPoint){
|
||||
url += "¢er=" + $scope.control.value.focalPoint.top +"," + $scope.control.value.focalPoint.left;
|
||||
url += "¢er=" + $scope.control.value.focalPoint.top +"," + $scope.control.value.focalPoint.left;
|
||||
url += "&mode=crop";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.url = url;
|
||||
}
|
||||
};
|
||||
@@ -47,4 +47,4 @@ angular.module("umbraco")
|
||||
$scope.setImage();
|
||||
}
|
||||
}, 200);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user