Mercurial > code > home > repos > light9
diff web/timeline/TimeAxis.coffee @ 2376:4556eebe5d73
topdir reorgs; let pdm have its src/ dir; separate vite area from light9/
author | drewp@bigasterisk.com |
---|---|
date | Sun, 12 May 2024 19:02:10 -0700 |
parents | light9/web/timeline/TimeAxis.coffee@d991f7c3485a |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/timeline/TimeAxis.coffee Sun May 12 19:02:10 2024 -0700 @@ -0,0 +1,19 @@ +log = debug('timeline') +debug.enable('*') + +Drawing = window.Drawing +ROW_COUNT = 7 + + + + +@customElement("light9-timeline-time-axis") +class TimeAxis extends LitElement + @getter_properties: + viewState: { type: Object, notify: true, observer: "onViewState" } + onViewState: -> + ko.computed => + dependOn = [@viewState.zoomSpec.t1(), @viewState.zoomSpec.t2()] + pxPerTick = 50 + axis = d3.axisTop(@viewState.zoomInX).ticks(@viewState.width() / pxPerTick) + d3.select(@$.axis).call(axis) \ No newline at end of file