Skip to content

Instantly share code, notes, and snippets.

@radmiraal
Created January 27, 2012 12:12
Show Gist options
  • Save radmiraal/1688514 to your computer and use it in GitHub Desktop.
Save radmiraal/1688514 to your computer and use it in GitHub Desktop.
_cropOptions
_cropWidth:null,
_cropHeight:null,
_cropX:null,
_cropY:null,
_cropOptions: function(key, value) {
if (arguments.length === 1) {
return {
w: this.get('_cropWidth'),
h: this.get('_cropHeight'),
x: this.get('_cropX'),
y: this.get('_cropY')
};
} else {
this.set('_cropWidth', value.w || null);
this.set('_cropHeight', value.h || null);
this.set('_cropX', value.x || null);
this.set('_cropY', value.y || null);
return value;
}
}.property('_cropWidth', '_cropHeight', '_cropX', '_cropY').cacheable(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment