Mercurial > code > home > repos > light9
changeset 1326:e4c65310c050
zoom adjs center in audio section
Ignore-this: b6f54cb512d745e1f5c061294e9c13fe
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Sat, 04 Jun 2016 06:08:25 +0000 |
parents | 4210bbaf528f |
children | d6396679c121 |
files | light9/web/timeline.coffee |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/web/timeline.coffee Sat Jun 04 05:51:59 2016 +0000 +++ b/light9/web/timeline.coffee Sat Jun 04 06:08:25 2016 +0000 @@ -178,6 +178,7 @@ ] makeZoomAdjs: -> + yMid = @$.audio.offsetTop + @$.audio.offsetHeight / 2 dur = @viewState.zoomSpec.duration valForPos = (pos) => x = pos.e(1) @@ -186,9 +187,9 @@ observable: @viewState.zoomSpec.t1, valueLow: 0 valueHigh: dur - targetLow: $V([0, 30]) # y = @$.audio.offsetTop + @$.audio.offsetHeight / 2] - targetHigh: $V([@offsetWidth, 30]) - getSuggestedTargetOffset: () => $V([-30, 0]) + targetLow: $V([0, yMid]) + targetHigh: $V([@offsetWidth, yMid]) + getSuggestedTargetOffset: () => $V([-50, 0]) getValueForPos: valForPos }) @@ -196,9 +197,9 @@ observable: @viewState.zoomSpec.t2, valueLow: 0 valueHigh: dur - targetLow: $V([0, 30]) # y = @$.audio.offsetTop + @$.audio.offsetHeight / 2] - targetHigh: $V([@offsetWidth, 30]) - getSuggestedTargetOffset: () => $V([30, 0]) + targetLow: $V([0, yMid]) + targetHigh: $V([@offsetWidth, yMid]) + getSuggestedTargetOffset: () => $V([50, 0]) getValueForPos: valForPos })