@dawcore/components 0.0.30 → 0.0.31
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -8451,7 +8451,7 @@ DawKeyboardShortcutsElement = __decorateClass([
|
|
|
8451
8451
|
// src/elements/daw-spectrogram.ts
|
|
8452
8452
|
var import_lit19 = require("lit");
|
|
8453
8453
|
var import_decorators17 = require("lit/decorators.js");
|
|
8454
|
-
var
|
|
8454
|
+
var import_core11 = require("@waveform-playlist/core");
|
|
8455
8455
|
var DawSpectrogramElement = class extends import_lit19.LitElement {
|
|
8456
8456
|
constructor() {
|
|
8457
8457
|
super(...arguments);
|
|
@@ -8516,11 +8516,11 @@ var DawSpectrogramElement = class extends import_lit19.LitElement {
|
|
|
8516
8516
|
this._unregisterAllCanvases();
|
|
8517
8517
|
this._canvases = [];
|
|
8518
8518
|
if (this.length <= 0) return;
|
|
8519
|
-
const chunkCount = Math.ceil(this.length /
|
|
8519
|
+
const chunkCount = Math.ceil(this.length / import_core11.MAX_CANVAS_WIDTH);
|
|
8520
8520
|
for (let i = 0; i < chunkCount; i++) {
|
|
8521
|
-
const widthPx = Math.min(
|
|
8521
|
+
const widthPx = Math.min(import_core11.MAX_CANVAS_WIDTH, this.length - i * import_core11.MAX_CANVAS_WIDTH);
|
|
8522
8522
|
const canvas = document.createElement("canvas");
|
|
8523
|
-
canvas.style.left = i *
|
|
8523
|
+
canvas.style.left = i * import_core11.MAX_CANVAS_WIDTH + "px";
|
|
8524
8524
|
canvas.style.width = widthPx + "px";
|
|
8525
8525
|
const dpr = window.devicePixelRatio || 1;
|
|
8526
8526
|
canvas.width = widthPx * dpr;
|
|
@@ -8563,7 +8563,7 @@ var DawSpectrogramElement = class extends import_lit19.LitElement {
|
|
|
8563
8563
|
trackId: this.trackId,
|
|
8564
8564
|
channelIndex: this.channelIndex,
|
|
8565
8565
|
chunkIndex: i,
|
|
8566
|
-
globalPixelOffset: this.originX + i *
|
|
8566
|
+
globalPixelOffset: this.originX + i * import_core11.MAX_CANVAS_WIDTH,
|
|
8567
8567
|
widthPx: parseFloat(canvas.style.width),
|
|
8568
8568
|
heightPx: this.waveHeight
|
|
8569
8569
|
});
|