@waveform-playlist/ui-components 15.0.0-next.7 → 15.0.0-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 +3 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3100,10 +3100,9 @@ var SmartScale = ({
|
|
|
3100
3100
|
const { marker, bigStep, smallStep } = config;
|
|
3101
3101
|
const canvasInfo = /* @__PURE__ */ new Map();
|
|
3102
3102
|
const labels = [];
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
const pix = Math.floor(i);
|
|
3103
|
+
for (let counter = 0; ; counter += smallStep) {
|
|
3104
|
+
const pix = Math.floor(counter * sampleRate / (1e3 * samplesPerPixel));
|
|
3105
|
+
if (!(pix < widthX)) break;
|
|
3107
3106
|
if (counter % marker === 0) {
|
|
3108
3107
|
labels.push({
|
|
3109
3108
|
id: `timestamp-${counter}`,
|
|
@@ -3117,7 +3116,6 @@ var SmartScale = ({
|
|
|
3117
3116
|
} else if (counter % smallStep === 0) {
|
|
3118
3117
|
canvasInfo.set(pix, Math.floor(timeScaleHeight / 5));
|
|
3119
3118
|
}
|
|
3120
|
-
counter += smallStep;
|
|
3121
3119
|
}
|
|
3122
3120
|
return { widthX, canvasInfo, labels };
|
|
3123
3121
|
}, [beatsAndBars, duration, samplesPerPixel, sampleRate, timeScaleHeight]);
|