@vnejs/plugins.canvas.child.bg 0.2.1 → 0.2.2

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.
@@ -8,7 +8,7 @@ export class LayerBgShow extends ModuleCore {
8
8
  onBgShow = async ({ name, layer, transition, duration, args = {}, hideOldBgsOnShow = true } = {}) => {
9
9
  const clonedArgs = await this.emitClone(args);
10
10
  const shouldHideOldImages = hideOldBgsOnShow || clonedArgs.hideOldBgsOnShow;
11
- const id = clonedArgs.id || (await this.emitOne(this.EVENTS.VENDORS.UID));
11
+ const id = clonedArgs.id || crypto.randomUUID();
12
12
  const oldChildsId = shouldHideOldImages
13
13
  ? (await this.emitOne(this.EVENTS.LAYER_BG.STATE_GET, { layer })).map((item) => item.id)
14
14
  : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.canvas.child.bg",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,7 @@ export class LayerBgShow extends ModuleCore<BgPluginEvents, BgPluginConstants, B
16
16
 
17
17
  const shouldHideOldImages = hideOldBgsOnShow || clonedArgs.hideOldBgsOnShow;
18
18
 
19
- const id = clonedArgs.id || (await this.emitOne(this.EVENTS.VENDORS.UID));
19
+ const id = clonedArgs.id || crypto.randomUUID();
20
20
  const oldChildsId = shouldHideOldImages
21
21
  ? ((await this.emitOne(this.EVENTS.LAYER_BG.STATE_GET, { layer })) as BgStateIdPayload[]).map((item) => item.id!)
22
22
  : [];