mr-image icon indicating copy to clipboard operation
mr-image copied to clipboard

Bug: selector.crop() doesn't update if image is changed.

Open brazorf opened this issue 8 years ago • 0 comments

Markup:

<button ng-click="toggle()">Toggle image</button>
<button ng-click="crop()">Crop</button>
<div mr-image mr-max-width="600" mr-src="img.src" mr-selector="selector"></div>

Controller:

$scope.selector = {};
$scope.img = {src: "foo/bar.jpg"}

$scope.crop = function() {
    $scope.cropped = $scope.selector.crop();
    console.log($scope.cropped);
}

$scope.toggle = function() {
    $scope.img.src = "foo/baz.jpg"
}

Steps to reproduce:

  1. crop image 1
  2. save the base64 output from the console
  3. click toggle, so that image is switched (display updates properly)
  4. crop image 2
  5. save the base64 output from the console
  6. generate the images from the given base64 encodings (use this converter for example)

You'll see that the 2nd crop is from the image 1.

brazorf avatar Apr 15 '16 17:04 brazorf