[Time Controller] Update model state for text entry

This commit is contained in:
Victor Woeltjen 2015-10-21 15:08:44 -07:00
parent 6d2b2fd81e
commit f88e8ebb51

View File

@ -186,6 +186,8 @@ define(
function updateOuterStart(t) { function updateOuterStart(t) {
var ngModel = $scope.ngModel; var ngModel = $scope.ngModel;
ngModel.outer.start = t;
ngModel.outer.end = Math.max( ngModel.outer.end = Math.max(
ngModel.outer.start + outerMinimumSpan, ngModel.outer.start + outerMinimumSpan,
ngModel.outer.end ngModel.outer.end
@ -198,14 +200,14 @@ define(
ngModel.inner.end ngModel.inner.end
); );
$scope.startOuterText = formatTimestamp(t);
updateViewForInnerSpanFromModel(ngModel); updateViewForInnerSpanFromModel(ngModel);
} }
function updateOuterEnd(t) { function updateOuterEnd(t) {
var ngModel = $scope.ngModel; var ngModel = $scope.ngModel;
ngModel.outer.end = t;
ngModel.outer.start = Math.min( ngModel.outer.start = Math.min(
ngModel.outer.end - outerMinimumSpan, ngModel.outer.end - outerMinimumSpan,
ngModel.outer.start ngModel.outer.start
@ -218,8 +220,6 @@ define(
ngModel.inner.start ngModel.inner.start
); );
$scope.endOuterText = formatTimestamp(t);
updateViewForInnerSpanFromModel(ngModel); updateViewForInnerSpanFromModel(ngModel);
} }