Skip to content

Commit 432462b

Browse files
committed
Added 2 more options 'data-safe-move' and 'data-fill-color'
- merge pull request andyshora#30
1 parent 854982d commit 432462b

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

index.html

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,46 @@
1212
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.11/angular.min.js"></script>
1313
<!-- REQUIRED 2/3 - styles for the image crop component -->
1414
<link rel="stylesheet" href="image-crop-styles.css">
15-
15+
1616
<script>
17-
17+
1818
var myApp = null;
19-
19+
2020
(function() {
2121

22-
angular.module('myApp', ['ImageCropper'])
23-
22+
angular.module('myApp', ['ImageCropper'])
23+
2424
.controller('MainController', ['$scope', function($scope) {
25-
26-
$scope.fileChanged = function(e) {
27-
25+
26+
$scope.fileChanged = function(e) {
27+
2828
var files = e.target.files;
29-
29+
3030
var fileReader = new FileReader();
31-
fileReader.readAsDataURL(files[0]);
32-
31+
fileReader.readAsDataURL(files[0]);
32+
3333
fileReader.onload = function(e) {
3434
$scope.imgSrc = this.result;
3535
$scope.$apply();
3636
};
37-
38-
}
39-
37+
38+
}
39+
4040
$scope.clear = function() {
4141
$scope.imageCropStep = 1;
4242
delete $scope.imgSrc;
4343
delete $scope.result;
4444
delete $scope.resultBlob;
4545
};
46-
46+
4747
}]);
4848

4949
})();
5050
</script>
51-
51+
5252
<!-- REQUIRED 3/3 - the image crop directive -->
5353
<script src="image-crop.js"></script>
54-
54+
5555
<style>
5656
/* Styles for this demo page */
5757
body {
@@ -115,6 +115,8 @@
115115
data-shape="square"
116116
data-step="imageCropStep"
117117
src="imgSrc"
118+
data-safe-move="false"
119+
data-fill-color="red"
118120
data-result="result"
119121
data-result-blob="resultBlob"
120122
crop="initCrop"
@@ -144,4 +146,4 @@ <h2>Result</h2>
144146

145147
</div>
146148
</body>
147-
</html>
149+
</html>

0 commit comments

Comments
 (0)