Skip to content

Commit

Permalink
Syncs Cubelet and KeyframeFormView states.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Aug 14, 2013
1 parent 5f991e0 commit 6182821
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/ui/crosshair.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ define(['src/app', 'src/constants', 'src/utils'],
'left': this.model.get('x') + 'px'
,'top': this.model.get('y') + 'px'
});
var rotationCoords = this._$cubelet.cubeletGetCoords();
this._$cubelet.cubeletSetCoords({
'x': this.model.get('rX')
,'y': this.model.get('rY')
,'z': this.model.get('rZ')
});
this._$cubelet.cubeletApplyRotationToElement(this._$crosshairContainer);
}

,'updateModel': function () {
Expand Down
6 changes: 5 additions & 1 deletion src/ui/keyframe-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ define([
,'render': function () {
this.renderHeader();

// Yikes!
//
// TODO: Make this less repetitive.
if (this.model.get('x') !== parseFloat(this.$inputX.val())) {
this.incrementerViewX.$el.val(this.model.get('x'));
}
Expand Down Expand Up @@ -221,7 +224,8 @@ define([
var rXEasing = this.easeSelectViewRX.$el.val();
var rYEasing = this.easeSelectViewRY.$el.val();
var rZEasing = this.easeSelectViewRZ.$el.val();
var newEasingString = [xEasing, yEasing, rXEasing, rYEasing, rZEasing].join(' ');
var newEasingString = [
xEasing, yEasing, rXEasing, rYEasing, rZEasing].join(' ');

this.model.setEasingString(newEasingString);

Expand Down

0 comments on commit 6182821

Please sign in to comment.