This file contains 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, |
This file contains 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 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 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.Component.extend({ | |
}); |
This file contains 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'; | |
import Controller from 'ember-controller'; | |
import moment from 'moment'; | |
export default Ember.Controller.extend({ | |
appName: 'ember twiddle', | |
months: moment.months(), |
This file contains 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.Component.extend({ | |
didInsertElement() { | |
this._super(...arguments); | |
if (this.attrs.isAutoresize) { | |
this.resize(); | |
} | |
}, |
This file contains 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
module.exports = () => { | |
const _nodes = []; | |
return { | |
toString(){ | |
return _nodes; | |
}, | |
// array [ priority, key ] | |
set node(item) { |
This file contains 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
// http://jsbin.com/lirise/edit?js,output | |
function flatten (arr){ | |
if (!Array.isArray(arr)){ | |
if (arguments.length === 2) { | |
return arr; | |
} else { | |
throw new TypeError('flatten accepts only arrays'); | |
} |