Skip to content

Commit 42fe339

Browse files
committed
minor
1 parent 7343fd0 commit 42fe339

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

services/static-webserver/client/source/class/osparc/editor/AnnotationEditor.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,21 @@ qx.Class.define("osparc.editor.AnnotationEditor", {
129129
return;
130130
}
131131

132+
const annotationTypes = osparc.workbench.Annotation.TYPES;
133+
132134
const attrs = annotation.getAttributes();
133-
if (annotation.getType() === osparc.workbench.Annotation.TYPES.TEXT) {
135+
if (annotation.getType() === annotationTypes.TEXT) {
134136
const textField = this.getChildControl("text-field").set({
135137
value: attrs.text
136138
});
137139
textField.addListener("changeValue", e => annotation.setText(e.getData()));
138-
} else if (annotation.getType() === osparc.workbench.Annotation.TYPES.NOTE) {
140+
} else if (annotation.getType() === annotationTypes.NOTE) {
139141
const textArea = this.getChildControl("text-area").set({
140142
value: attrs.text
141143
});
142144
textArea.addListener("changeValue", e => annotation.setText(e.getData()));
143145
}
144146

145-
const annotationTypes = osparc.workbench.Annotation.TYPES;
146147
if ([annotationTypes.TEXT, annotationTypes.RECT].includes(annotation.getType())) {
147148
const colorPicker = this.getChildControl("color-picker");
148149
annotation.bind("color", colorPicker, "value");

0 commit comments

Comments
 (0)