fix: only record annotation color if not default

feat/type-attributes
Tomáš Mládek 2023-03-05 21:05:44 +01:00
parent 77a3a61063
commit e7e4121425
1 changed files with 6 additions and 4 deletions

View File

@ -118,10 +118,12 @@
c: new TimeFragment(region.start, region.end).toString(),
});
await putEntityAttribute(entity, "COLOR", {
t: "String",
c: region.color,
});
if (region.color !== DEFAULT_ANNOTATION_COLOR) {
await putEntityAttribute(entity, "COLOR", {
t: "String",
c: region.color,
});
}
if (Object.values(region.data).length) {
await putEntityAttribute(entity, "NOTE", region.data as IValue);