File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
services/static-webserver/client/source/class/osparc/workbench Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,25 @@ qx.Class.define("osparc.workbench.Annotation", {
154154 getRepresentationPosition : function ( ) {
155155 const representation = this . getRepresentation ( ) ;
156156 if ( representation ) {
157- const attrs = osparc . wrapper . Svg . getRectAttributes ( representation ) ;
158- return {
159- x : parseInt ( attrs . x ) ,
160- y : parseInt ( attrs . y )
161- } ;
157+ switch ( this . getType ( ) ) {
158+ case this . self ( ) . TYPES . RECT :
159+ case this . self ( ) . TYPES . TEXT :
160+ case this . self ( ) . TYPES . NOTE : {
161+ const attrs = osparc . wrapper . Svg . getRectAttributes ( representation ) ;
162+ return {
163+ x : parseInt ( attrs . x ) ,
164+ y : parseInt ( attrs . y ) ,
165+ } ;
166+ }
167+ case this . self ( ) . TYPES . CONVERSATION : {
168+ const x = representation . transform ( ) . x ;
169+ const y = representation . transform ( ) . y ;
170+ return {
171+ x,
172+ y,
173+ } ;
174+ }
175+ }
162176 }
163177 return null ;
164178 } ,
You can’t perform that action at this time.
0 commit comments