Skip to content

Commit 8799e63

Browse files
committed
move conversations
1 parent 6821022 commit 8799e63

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,19 @@ qx.Class.define("osparc.workbench.Annotation", {
125125
}
126126
}
127127
if (representation) {
128+
switch (this.getType()) {
129+
case this.self().TYPES.NOTE:
130+
case this.self().TYPES.RECT:
131+
case this.self().TYPES.TEXT:
132+
representation.node.addEventListener("click", e => {
133+
this.fireDataEvent("annotationClicked", e.ctrlKey);
134+
e.stopPropagation();
135+
}, this);
136+
break;
137+
case this.self().TYPES.CONVERSATION:
138+
break;
139+
}
128140
osparc.wrapper.Svg.makeDraggable(representation);
129-
representation.node.addEventListener("click", e => {
130-
this.fireDataEvent("annotationClicked", e.ctrlKey);
131-
e.stopPropagation();
132-
}, this);
133141
representation.on("dragstart", () => this.fireEvent("annotationStartedMoving"));
134142
representation.on("dragmove", () => this.fireEvent("annotationMoving"));
135143
representation.on("dragend", () => this.fireEvent("annotationStoppedMoving"));

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,13 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
523523

524524
__addAnnotationListeners: function(annotation) {
525525
annotation.addListener("annotationStartedMoving", () => {
526-
this.__selectAnnotation(annotation);
526+
if ([
527+
osparc.workbench.Annotation.TYPES.NOTE,
528+
osparc.workbench.Annotation.TYPES.RECT,
529+
osparc.workbench.Annotation.TYPES.TEXT,
530+
].includes(annotation.getType())) {
531+
this.__selectAnnotation(annotation);
532+
}
527533
this.__itemStartedMoving();
528534
}, this);
529535

services/static-webserver/client/source/class/osparc/wrapper/Svg.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ qx.Class.define("osparc.wrapper.Svg", {
300300
.font({
301301
size: iconSize
302302
})
303-
.move(padding, (bubbleHeight - iconSize) / 2)
304303
.attr({
305304
cursor: "pointer"
306-
});
305+
})
306+
.move(padding, (bubbleHeight - iconSize) / 2);
307307
bubble.add(icon);
308308

309309
// Title text
@@ -316,6 +316,9 @@ qx.Class.define("osparc.wrapper.Svg", {
316316
family: defaultFont["family"],
317317
anchor: 'start'
318318
})
319+
.attr({
320+
cursor: "pointer"
321+
})
319322
.move(padding + iconSize + 8, ((bubbleHeight - titleFontSize) / 2) - 3);
320323
bubble.add(label);
321324

0 commit comments

Comments
 (0)