@xiboplayer/renderer 0.6.7 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiboplayer/renderer",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "RendererLite - Fast, efficient XLF layout rendering engine",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -13,9 +13,9 @@
13
13
  "dependencies": {
14
14
  "nanoevents": "^9.1.0",
15
15
  "pdfjs-dist": "^4.10.38",
16
- "@xiboplayer/cache": "0.6.7",
17
- "@xiboplayer/schedule": "0.6.7",
18
- "@xiboplayer/utils": "0.6.7"
16
+ "@xiboplayer/cache": "0.6.8",
17
+ "@xiboplayer/utils": "0.6.8",
18
+ "@xiboplayer/schedule": "0.6.8"
19
19
  },
20
20
  "devDependencies": {
21
21
  "vitest": "^2.0.0",
@@ -2961,6 +2961,7 @@ export class RendererLite {
2961
2961
  }
2962
2962
 
2963
2963
  const oldLayoutId = this.currentLayoutId;
2964
+ const alreadyEmittedEnd = this.layoutEndEmitted;
2964
2965
 
2965
2966
  this.layoutEndEmitted = false;
2966
2967
  this.currentLayout = null;
@@ -3015,7 +3016,8 @@ export class RendererLite {
3015
3016
  // Emit layoutEnd for old layout AFTER setting new currentLayoutId —
3016
3017
  // the listener guard in main.ts sees the new layout already playing
3017
3018
  // and skips advance, while stats/tracking still run.
3018
- if (oldLayoutId) {
3019
+ // Skip if the layout timer already emitted layoutEnd (avoids double stats).
3020
+ if (oldLayoutId && !alreadyEmittedEnd) {
3019
3021
  this.emit('layoutEnd', oldLayoutId);
3020
3022
  }
3021
3023