Skip to content

Commit

Permalink
fix: replace UUID with @cocreate/uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Aug 9, 2021
1 parent e172c1d commit fc7e07d
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 95 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@cocreate/docs": "^1.1.32",
"@cocreate/message-client": "^1.0.12",
"@cocreate/observer": "^1.2.8",
"@cocreate/utils": "^1.0.16"
"@cocreate/utils": "^1.0.16",
"@cocreate/uuid": "^1.1.2"
}
}
5 changes: 3 additions & 2 deletions src/collaboration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import utils from '@cocreate/utils';
import message from '@cocreate/message-client';
import uuid from '@cocreate/uuid';

function wrapper() {

Expand Down Expand Up @@ -81,7 +82,7 @@ function wrapper() {
window.CoCreate;

if (!dropedEl.getAttribute("data-element_id"))
dropedEl.setAttribute("data-element_id", utils.UUID());
dropedEl.setAttribute("data-element_id", uuid.generate(6));

dropedEl = dropedEl.getAttribute("data-element_id");

Expand All @@ -107,7 +108,7 @@ function wrapper() {
}
else {
if (!dragedEl.getAttribute("data-element_id"))
dragedEl.setAttribute("data-element_id", utils.UUID());
dragedEl.setAttribute("data-element_id", uuid.generate(6));

dragedEl = dragedEl.getAttribute("data-element_id");

Expand Down
Loading

0 comments on commit fc7e07d

Please sign in to comment.