Last active
August 30, 2018 13:25
-
-
Save Romanior/ba1f81d311be62519a9dd74d73634f76 to your computer and use it in GitHub Desktop.
New Twiddle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imageCropper from 'ember-cli-image-cropper/components/image-cropper'; | |
export default imageCropper.extend({ | |
//override default options of cropper | |
aspectRatio: 1, | |
minCropBoxWidth: 100, | |
minCropBoxHeight: 100, | |
cropperContainer: '.cropper-container > img', | |
previewClass: '.img-preview', | |
croppedAvatar: null, | |
checkCrossOrigin: false, | |
actions: { | |
getCroppedAvatar() { | |
let cropper = this.get('cropper'), | |
croppedImage = cropper.getCroppedCanvas(); | |
this.set('croppedAvatar', croppedImage); | |
} | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.2.2", | |
"ember-template-compiler": "3.2.2", | |
"ember-testing": "3.2.2" | |
}, | |
"addons": { | |
"ember-data": "3.2.0", | |
"ember-cli-image-cropper": "0.0.13" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment