CrackerakiUA/ngImgCropFullExtended

While cropping can we give default size and location for the cropper

Closed this issue · 1 comments

I am creating a new issue as I cannot reopen #134

I was able to change the location using

area-init-coords="{x: 0, y: 0}"

But I need to change the location based on the screen width and height. So is there a way we can change this dynamically like

area-init-coords="{{cropLocation}}"

and in controller

$scope.cropLocation = "{x: 0, y: 0}"

Can this be done

Okay got it with this

area-init-coords="{x: cropLocation.cropTop, y: cropLocation.cropLeft}"

$scope.rectangleTop = 100;
$scope.rectangleLeft = 100;

$scope.cropLocation = {
    cropTop: $scope.rectangleTop,
    cropLeft: $scope.rectangleLeft
};

Thanks. And sorry for the trouble.