
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.98 KB | hits: 14 | expires: Never
allowsEmptySelection: NO,
allowsMultipleSelection: NO,
current: null,
previous: function () {
var current = this.get('current');
return this.objectAt(this.lastIndexOf(current)-1) || null;
}.property('current').cacheable(),
next: function () {
var current = this.get('current');
return this.objectAt(this.lastIndexOf(current)+1) || null;
}.property('current').cacheable(),
backImage: function () {
if (this.get('canNavigateBackward')) {
this.set('current', this.get('previous'));
}
return YES;
},
forwardImage: function () {
if (this.get('canNavigateForward')) {
this.set('current', this.get('next'));
}
return YES;
},
canNavigateBackward: function () {
return this.get('current') !== this.objectAt(0);
}.property('current').cacheable(),
canNavigateForward: function () {
return this.get('current') !== this.objectAt(this.get('length')-1);
}.property('current').cacheable()