form_image_cropping.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!-- start: PAGE TITLE -->
  2. <section id="page-title">
  3. <div class="row">
  4. <div class="col-sm-8">
  5. <h1 class="mainTitle" translate="sidebar.nav.forms.CROPPING">{{ mainTitle }}</h1>
  6. <span class="mainDescription">Simple Image Crop directive for AngularJS. Enables to crop a circle or a square out of an image.</span>
  7. </div>
  8. <div ncy-breadcrumb></div>
  9. </div>
  10. </section>
  11. <!-- end: PAGE TITLE -->
  12. <!-- start: IMAGE CROP EXAMPLE -->
  13. <div class="container-fluid container-fullw bg-white">
  14. <div class="row">
  15. <div class="col-md-12">
  16. <h5 class="over-title margin-bottom-15">Image Crop <span class="text-bold">example</span></h5>
  17. <p class="margin-bottom-20">
  18. Add the image crop directive <code>&lt;img-crop&gt;</code>
  19. to the HTML file where you want to use an image crop control.
  20. <br />
  21. <em>Note:</em>
  22. a container, you place the directive to, should have some pre-defined size (absolute or relative to its parent). That's required, because the image crop control fits the size of its container.
  23. </p>
  24. <!-- /// controller: 'CropCtrl' - localtion: assets/js/controllers/cropCtrl.js /// -->
  25. <div ng-controller="CropCtrl">
  26. <div class="row">
  27. <div class="col-md-12 margin-bottom-30">
  28. <span class="btn btn-primary btn-file"> Select an image file
  29. <input type="file" id="fileInput"/>
  30. </span>
  31. <div class="btn-group">
  32. <label class="btn btn-default btn-primary btn-o" ng-model="cropType" btn-radio="'square'">
  33. Square
  34. </label>
  35. <label class="btn btn-primary btn-o" ng-model="cropType" btn-radio="'circle'">
  36. Circle
  37. </label>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col-md-6">
  43. <div class="cropBox">
  44. <div class="cropArea">
  45. <img-crop image="myImage" result-image="myCroppedImage" area-type="{{cropType}}"></img-crop>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="col-md-6">
  50. <div class="cropBox croppedBox">
  51. <div>
  52. <img ng-src="{{myCroppedImage}}" />
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- end: IMAGE CROP EXAMPLE -->