@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 +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -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 *
|
|
2973
|
-
if (pix
|
|
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) });
|