[Time Conductor] Enforce inner minimums on outer changes

This commit is contained in:
Victor Woeltjen 2015-10-09 07:32:46 -07:00
parent f738f84075
commit ebd8fdeee3

View File

@ -184,8 +184,10 @@ define(
ngModel.inner.start =
Math.max(ngModel.outer.start, ngModel.inner.start);
ngModel.inner.end =
Math.max(ngModel.outer.start, ngModel.inner.end);
ngModel.inner.end = Math.max(
ngModel.inner.start + innerMinimumSpan,
ngModel.inner.end
);
$scope.startOuterText = formatTimestamp(t);
@ -200,10 +202,12 @@ define(
ngModel.outer.start
);
ngModel.inner.start =
Math.min(ngModel.outer.end, ngModel.inner.start);
ngModel.inner.end =
Math.min(ngModel.outer.end, ngModel.inner.end);
ngModel.inner.start = Math.min(
ngModel.inner.end - innerMinimumSpan,
ngModel.inner.start
);
$scope.endOuterText = formatTimestamp(t);