Replace Date.now().toString() with crypto.randomUUID() for ID generation
This commit is contained in:
@@ -26,7 +26,7 @@ class TableTool extends Tool {
|
||||
const x = this.startPoint.x;
|
||||
const y = this.startPoint.y;
|
||||
this.yjsDoc.createElement({
|
||||
id: Date.now().toString(),
|
||||
id: crypto.randomUUID(),
|
||||
type: 'round_table',
|
||||
layerId: 'default',
|
||||
x: x - this.radius,
|
||||
@@ -46,7 +46,7 @@ class TableTool extends Tool {
|
||||
const width = Math.abs(event.clientX - this.startPoint.x);
|
||||
const height = Math.abs(event.clientY - this.startPoint.y);
|
||||
this.yjsDoc.createElement({
|
||||
id: Date.now().toString(),
|
||||
id: crypto.randomUUID(),
|
||||
type: 'rectangular_table',
|
||||
layerId: 'default',
|
||||
x,
|
||||
|
||||
Reference in New Issue
Block a user