jassub 1.1.6 → 1.1.11
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/README.md +4 -2
- package/dist/COPYRIGHT +38 -38
- package/dist/jassub-worker-legacy.js +10 -10
- package/dist/jassub-worker-legacy.js.mem +0 -0
- package/dist/jassub-worker.js +1 -1
- package/dist/jassub-worker.wasm +0 -0
- package/dist/jassub.es.js +19 -21
- package/dist/jassub.js +1605 -0
- package/dist/jassub.umd.js +1 -1
- package/index.d.ts +112 -0
- package/package.json +39 -38
- package/src/jassub.js +21 -23
package/dist/jassub.es.js
CHANGED
|
@@ -178,30 +178,28 @@ const _JASSUB = class extends EventTarget {
|
|
|
178
178
|
top = videoSize.y - (this._canvasParent.getBoundingClientRect().top - this._video.getBoundingClientRect().top);
|
|
179
179
|
left = videoSize.x;
|
|
180
180
|
}
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this._resizeTimeoutBuffer =
|
|
192
|
-
this._resizeTimeoutBuffer = void 0;
|
|
193
|
-
this._canvasctrl.width = width;
|
|
194
|
-
this._canvasctrl.height = height;
|
|
195
|
-
this.sendMessage("canvas", { width, height });
|
|
196
|
-
}, 100);
|
|
197
|
-
} else {
|
|
181
|
+
if (videoSize != null) {
|
|
182
|
+
this._canvas.style.top = top + "px";
|
|
183
|
+
this._canvas.style.left = left + "px";
|
|
184
|
+
this._canvas.style.width = videoSize.width + "px";
|
|
185
|
+
this._canvas.style.height = videoSize.height + "px";
|
|
186
|
+
}
|
|
187
|
+
if (!(this._canvasctrl.width === width && this._canvasctrl.height === height)) {
|
|
188
|
+
if (this._resizeTimeoutBuffer) {
|
|
189
|
+
clearTimeout(this._resizeTimeoutBuffer);
|
|
190
|
+
this._resizeTimeoutBuffer = setTimeout(() => {
|
|
191
|
+
this._resizeTimeoutBuffer = void 0;
|
|
198
192
|
this._canvasctrl.width = width;
|
|
199
193
|
this._canvasctrl.height = height;
|
|
200
194
|
this.sendMessage("canvas", { width, height });
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
195
|
+
}, 100);
|
|
196
|
+
} else {
|
|
197
|
+
this._canvasctrl.width = width;
|
|
198
|
+
this._canvasctrl.height = height;
|
|
199
|
+
this.sendMessage("canvas", { width, height });
|
|
200
|
+
this._resizeTimeoutBuffer = setTimeout(() => {
|
|
201
|
+
this._resizeTimeoutBuffer = void 0;
|
|
202
|
+
}, 100);
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
205
|
}
|