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

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.js CHANGED
@@ -3027,10 +3027,9 @@ function computeTemporalTicks(samplesPerPixel, sampleRate, duration, rulerHeight
3027
3027
  const { marker, bigStep, smallStep } = config;
3028
3028
  const canvasInfo = /* @__PURE__ */ new Map();
3029
3029
  const labels = [];
3030
- const pixPerSec = sampleRate / samplesPerPixel;
3031
3030
  for (let counter = 0; ; counter += smallStep) {
3032
- const pix = Math.floor(counter / 1e3 * pixPerSec);
3033
- if (pix >= widthX) break;
3031
+ const pix = Math.floor(counter * sampleRate / (1e3 * samplesPerPixel));
3032
+ if (!(pix < widthX)) break;
3034
3033
  if (counter % marker === 0) {
3035
3034
  canvasInfo.set(pix, rulerHeight);
3036
3035
  labels.push({ pix, text: formatTime(counter) });