@@ -111,41 +111,29 @@ qx.Class.define("osparc.workbench.Annotation", {
111111 case this . self ( ) . TYPES . NOTE : {
112112 const user = osparc . store . Groups . getInstance ( ) . getUserByGroupId ( attrs . recipientGid ) ;
113113 representation = this . __svgLayer . drawAnnotationNote ( attrs . x , attrs . y , user ? user . getLabel ( ) : "" , attrs . text ) ;
114- representation . isSVG = true ;
115114 break ;
116115 }
117116 case this . self ( ) . TYPES . RECT :
118117 representation = this . __svgLayer . drawAnnotationRect ( attrs . width , attrs . height , attrs . x , attrs . y , this . getColor ( ) ) ;
119- representation . isSVG = true ;
120118 break ;
121119 case this . self ( ) . TYPES . TEXT :
122120 representation = this . __svgLayer . drawAnnotationText ( attrs . x , attrs . y , attrs . text , this . getColor ( ) , attrs . fontSize ) ;
123- representation . isSVG = true ;
124121 break ;
125122 case this . self ( ) . TYPES . CONVERSATION : {
126123 const text = `${ attrs . x } , ${ attrs . y } ` ;
127124 representation = this . __svgLayer . drawAnnotationConversation ( attrs . x , attrs . y , text ) ;
128- representation . isSVG = true ;
129125 break ;
130126 }
131127 }
132128 if ( representation ) {
133- if ( representation . isSVG ) {
134- osparc . wrapper . Svg . makeDraggable ( representation ) ;
135- representation . node . addEventListener ( "click" , e => {
136- this . fireDataEvent ( "annotationClicked" , e . ctrlKey ) ;
137- e . stopPropagation ( ) ;
138- } , this ) ;
139- representation . on ( "dragstart" , ( ) => this . fireEvent ( "annotationStartedMoving" ) ) ;
140- representation . on ( "dragmove" , ( ) => this . fireEvent ( "annotationMoving" ) ) ;
141- representation . on ( "dragend" , ( ) => this . fireEvent ( "annotationStoppedMoving" ) ) ;
142- } else {
143- representation . addListener ( "tap" , e => {
144- this . fireDataEvent ( "annotationClicked" , e . ctrlKey ) ;
145- e . stopPropagation ( ) ;
146- } , this ) ;
147- // OM: handle drag events for non-SVG representations
148- }
129+ osparc . wrapper . Svg . makeDraggable ( representation ) ;
130+ representation . node . addEventListener ( "click" , e => {
131+ this . fireDataEvent ( "annotationClicked" , e . ctrlKey ) ;
132+ e . stopPropagation ( ) ;
133+ } , this ) ;
134+ representation . on ( "dragstart" , ( ) => this . fireEvent ( "annotationStartedMoving" ) ) ;
135+ representation . on ( "dragmove" , ( ) => this . fireEvent ( "annotationMoving" ) ) ;
136+ representation . on ( "dragend" , ( ) => this . fireEvent ( "annotationStoppedMoving" ) ) ;
149137 this . setRepresentation ( representation ) ;
150138 }
151139 } ,
0 commit comments