projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update from RIFT as of 696b75d2fe9fb046261b08c616f1bcf6c0b54a9b third try
[osm/UI.git]
/
skyquake
/
plugins
/
composer
/
src
/
src
/
libraries
/
UniqueId.js
diff --git
a/skyquake/plugins/composer/src/src/libraries/UniqueId.js
b/skyquake/plugins/composer/src/src/libraries/UniqueId.js
index
8f7344e
..
3e3cd39
100644
(file)
--- a/
skyquake/plugins/composer/src/src/libraries/UniqueId.js
+++ b/
skyquake/plugins/composer/src/src/libraries/UniqueId.js
@@
-45,8
+45,16
@@
export default class UID {
return !!UID.from(obj);
}
return !!UID.from(obj);
}
- static assignUniqueId(obj) {
- return obj[UID.propertyName] = UID.create();
+ static assignUniqueId(obj, uid = null) {
+ if (!obj || /undefined|null/.test(obj)) {
+ return;
+ }
+ uid = uid || UID.create();
+ if (obj.uiState) {
+ obj.uiState[UID.propertyName] = uid;
+ } else {
+ obj[UID.propertyName] = uid;
+ }
}
}
}
}