From 976da4cd267037c3917f8a40bd01672c402497d2 Mon Sep 17 00:00:00 2001 From: "Eric.Lee" <liwei7016@vip.qq.com> Date: Wed, 7 Apr 2021 13:41:24 +0800 Subject: [PATCH] New uuid package --- src/app/play/play.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/play/play.component.ts b/src/app/play/play.component.ts index e0ee5ae..e6dc32b 100644 --- a/src/app/play/play.component.ts +++ b/src/app/play/play.component.ts @@ -8,7 +8,7 @@ import { HostListener } from "@angular/core"; -import { UUID } from 'angular2-uuid'; +import { v4 as uuidv4 } from 'uuid'; import { MySprite, @@ -1199,14 +1199,14 @@ export class PlayComponent implements OnInit, OnDestroy { line_1.setScaleXY(this.g_mapScale) line_1.anchorX = (line_1.width - line_1.height / 2) / line_1.width; line_1.anchorY = 0; - line_1.id = UUID.UUID(); + line_1.id = uuidv4(); const line_2 = new MySprite(); line_2.init(this.g_cartoon.images.get(color)); line_2.setScaleXY(this.g_mapScale) line_2.anchorX = (line_2.width - line_2.height / 2) / line_2.width; line_2.anchorY = 0; - line_2.id = UUID.UUID(); + line_2.id = uuidv4(); line_1.visible = false line_2.visible = false @@ -1216,7 +1216,7 @@ export class PlayComponent implements OnInit, OnDestroy { line_3.setScaleXY(this.g_mapScale) line_3.anchorX = (line_3.width - line_3.height / 2) / line_3.width; line_3.anchorY = 0; - line_3.id = UUID.UUID(); + line_3.id = uuidv4(); let target_1 = this.g_cartoon.getCartoonElement(T1).ref.dot let target_2 = this.g_cartoon.getCartoonElement(T2).ref.dot -- 2.21.0