File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff 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" ) ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments