Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

fix image not change on second time choosing file #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ angular.module('demo', ['ngCropper'])
Cropper.encode((file = blob)).then(function(dataUrl) {
$scope.dataUrl = dataUrl;
$timeout(showCropper); // wait for $digest to set image's src
$timeout(hideCropper);
});
};

Expand Down Expand Up @@ -81,7 +82,6 @@ angular.module('demo', ['ngCropper'])

function showCropper() { $scope.$broadcast($scope.showEvent); }
function hideCropper() { $scope.$broadcast($scope.hideEvent); }

});

})();