@@ -1448,7 +1448,7 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
14481448 this . __annotationInitPos = null ;
14491449 }
14501450 if ( this . __annotating ) {
1451- if ( this . __consolidateAnnotation ( this . __annotating , annotationInitPos , this . __rectAnnotationRepr ) ) {
1451+ if ( this . __consolidateAnnotation ( annotationInitPos , this . __rectAnnotationRepr ) ) {
14521452 if ( this . __rectAnnotationRepr ) {
14531453 osparc . wrapper . Svg . removeItem ( this . __rectAnnotationRepr ) ;
14541454 this . __rectAnnotationRepr = null ;
@@ -1590,10 +1590,6 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
15901590 this . setScale ( closestDown ) ;
15911591 } ,
15921592
1593- startConversation : function ( ) {
1594- this . __toolHint . setValue ( this . tr ( "Pick the position" ) ) ;
1595- } ,
1596-
15971593 startAnnotationsNote : function ( ) {
15981594 this . __annotating = osparc . workbench . Annotation . TYPES . NOTE ;
15991595 this . __toolHint . setValue ( this . tr ( "Pick the position" ) ) ;
@@ -1614,6 +1610,16 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
16141610 }
16151611 } ,
16161612
1613+ startConversation : function ( workbenchPos ) {
1614+ this . __annotating = osparc . workbench . Annotation . TYPES . CONVERSATION ;
1615+ if ( workbenchPos ) {
1616+ this . __annotationInitPos = workbenchPos ;
1617+ this . __mouseUp ( ) ;
1618+ } else {
1619+ this . __toolHint . setValue ( this . tr ( "Pick the position" ) ) ;
1620+ }
1621+ } ,
1622+
16171623 __openNodeRenamer : function ( nodeId ) {
16181624 const node = this . getStudy ( ) . getWorkbench ( ) . getNode ( nodeId ) ;
16191625 const treeItemRenamer = new osparc . widget . Renamer ( node . getLabel ( ) ) ;
@@ -1896,7 +1902,8 @@ qx.Class.define("osparc.workbench.WorkbenchUI", {
18961902 }
18971903 } ,
18981904
1899- __consolidateAnnotation : function ( type , initPos , annotation ) {
1905+ __consolidateAnnotation : function ( initPos , annotation ) {
1906+ const type = this . __annotating ;
19001907 const annotationTypes = osparc . workbench . Annotation . TYPES ;
19011908 const color = this . __annotationLastColor ? this . __annotationLastColor : osparc . workbench . Annotation . DEFAULT_COLOR ;
19021909 const serializeData = {
0 commit comments