Skip to content

Commit 42db889

Browse files
committed
nullable color
1 parent c3f81f0 commit 42db889

File tree

1 file changed

+8
-4
lines changed
  • services/static-webserver/client/source/class/osparc/workbench

1 file changed

+8
-4
lines changed

services/static-webserver/client/source/class/osparc/workbench/Annotation.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ qx.Class.define("osparc.workbench.Annotation", {
7676
check: "Color",
7777
event: "changeColor",
7878
init: "#FFFF01",
79-
apply: "__applyColor"
79+
nullable: true,
80+
apply: "__applyColor",
8081
},
8182

8283
attributes: {
@@ -223,11 +224,14 @@ qx.Class.define("osparc.workbench.Annotation", {
223224
},
224225

225226
serialize: function() {
226-
return {
227+
const data = {
227228
type: this.getType(),
228229
attributes: this.getAttributes(),
229-
color: this.getColor()
230-
};
230+
}
231+
if (this.getColor()) {
232+
data.color = this.getColor();
233+
}
234+
return data;
231235
}
232236
}
233237
});

0 commit comments

Comments
 (0)