File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ I'm attempting to make a self-contained AngularJS Directive which will allow you
2828* max-size (integer) - max size of the image, in pixels
2929* shape (string) - the cropping guideline shape (circle/square)
3030* step (bound integer) - the variable which dictates which step the user will see (used for resetting purposes)
31+ * safe-move(string true/false) - allow moving the image under the cropping area without restrictions
32+ * fill-color(string color name / HEX) - the color to fill with the empty space (used with safe-move)
3133* src (bound Blob or base64 string) - scope variable that will be the source image for the crop
3234* result (bound string) - the variable which will have the resulting data uri bound to it
3335* result-blob (bound Blob) - the variable which will have the resulting data as a Blob object
@@ -40,6 +42,8 @@ I'm attempting to make a self-contained AngularJS Directive which will allow you
4042 data-width =" 150"
4143 data-shape =" square"
4244 data-step =" imageCropStep"
45+ data-safe-move =' true'
46+ data-fill-color =" red"
4347 src =" imgSrc"
4448 data-result =" result"
4549 data-result-blob =" resultBlob"
Original file line number Diff line number Diff line change 99
1010 < meta name ="viewport " content ="width=device-width, user-scalable=no, initial-scale=1 ">
1111 <!-- REQUIRED 1/3 - AngularJS Core -->
12- < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta .11/angular.min.js "> </ script >
12+ < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.5 .11/angular.min.js "> </ script >
1313 <!-- REQUIRED 2/3 - styles for the image crop component -->
1414 < link rel ="stylesheet " href ="image-crop-styles.css ">
1515
Original file line number Diff line number Diff line change 66 < title > Test</ title >
77 < meta name ="viewport " content ="width=device-width, user-scalable=no, initial-scale=1 ">
88 <!-- REQUIRED 1/3 - AngularJS Core -->
9- < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta .11/angular.min.js "> </ script >
9+ < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.5 .11/angular.min.js "> </ script >
1010 <!-- REQUIRED 2/3 - styles for the image crop component -->
1111 < link rel ="stylesheet " href ="image-crop-styles.css ">
1212 < script >
@@ -116,4 +116,4 @@ <h2>Result</h2>
116116 < p ng-hide ="imageCropResult2 "> Not cropped yet</ p >
117117 </ div >
118118 </ body >
119- </ html >
119+ </ html >
Original file line number Diff line number Diff line change 1717 " cropper" ,
1818 " avatar"
1919 ],
20+ "dependencies" : {
21+ "angular" : " ^1.5.11"
22+ },
2023 "readmeFilename" : " README.md" ,
2124 "bugs" : {
2225 "url" : " https://github.com/andyshora/angular-image-crop/issues" ,
You can’t perform that action at this time.
0 commit comments