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/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 (this._canvas.style.top !== top + "px" || this._canvas.style.left !== left + "px") {
182
- if (videoSize != null) {
183
- this._canvas.style.top = top + "px";
184
- this._canvas.style.left = left + "px";
185
- this._canvas.style.width = videoSize.width + "px";
186
- this._canvas.style.height = videoSize.height + "px";
187
- }
188
- if (!(this._canvasctrl.width === width && this._canvasctrl.height === height)) {
189
- if (this._resizeTimeoutBuffer) {
190
- clearTimeout(this._resizeTimeoutBuffer);
191
- this._resizeTimeoutBuffer = setTimeout(() => {
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
- this._resizeTimeoutBuffer = setTimeout(() => {
202
- this._resizeTimeoutBuffer = void 0;
203
- }, 100);
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
  }