@dawcore/components 0.0.39-next.7 → 0.0.39-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ var __decorateClass = (decorators, target, key, kind) => {
10
10
  };
11
11
 
12
12
  // <define:__INSTALL_SPECS__>
13
- var define_INSTALL_SPECS_default = { "@dawcore/faust": "@dawcore/faust@^0.0.2-next.1", "@dawcore/midi": "@dawcore/midi@^0.0.6-next.5", "@dawcore/transport": "@dawcore/transport@^0.0.16-next.4", "@dawcore/wam": "@dawcore/wam@^0.0.5-next.0", "@waveform-playlist/core": "@waveform-playlist/core@^13.0.0-next.4", "@waveform-playlist/engine": "@waveform-playlist/engine@^14.0.0-next.4", "@waveform-playlist/worklets": "@waveform-playlist/worklets@^13.0.1-next.0", "@waveform-playlist/playout": "@waveform-playlist/playout@^13.0.0-next.4" };
13
+ var define_INSTALL_SPECS_default = { "@dawcore/faust": "@dawcore/faust@^0.0.2-next.1", "@dawcore/midi": "@dawcore/midi@^0.0.6-next.6", "@dawcore/transport": "@dawcore/transport@^0.0.16-next.5", "@dawcore/wam": "@dawcore/wam@^0.0.5-next.0", "@waveform-playlist/core": "@waveform-playlist/core@^13.0.0-next.5", "@waveform-playlist/engine": "@waveform-playlist/engine@^14.0.0-next.4", "@waveform-playlist/worklets": "@waveform-playlist/worklets@^13.0.1-next.0", "@waveform-playlist/playout": "@waveform-playlist/playout@^13.0.0-next.5" };
14
14
 
15
15
  // src/elements/daw-annotation.ts
16
16
  import { LitElement } from "lit";
@@ -2967,10 +2967,9 @@ function computeTemporalTicks(samplesPerPixel, sampleRate, duration, rulerHeight
2967
2967
  const { marker, bigStep, smallStep } = config;
2968
2968
  const canvasInfo = /* @__PURE__ */ new Map();
2969
2969
  const labels = [];
2970
- const pixPerSec = sampleRate / samplesPerPixel;
2971
2970
  for (let counter = 0; ; counter += smallStep) {
2972
- const pix = Math.floor(counter / 1e3 * pixPerSec);
2973
- if (pix >= widthX) break;
2971
+ const pix = Math.floor(counter * sampleRate / (1e3 * samplesPerPixel));
2972
+ if (!(pix < widthX)) break;
2974
2973
  if (counter % marker === 0) {
2975
2974
  canvasInfo.set(pix, rulerHeight);
2976
2975
  labels.push({ pix, text: formatTime(counter) });