@@ -213,16 +213,20 @@ qx.Class.define("osparc.data.model.StudyUI", {
213213 }
214214 } ,
215215
216- __updateAnnotationPositionFromDiff : function ( annotation , positionDiff ) {
216+ __updateAnnotationAttributesFromDiff : function ( annotation , attributesDiff ) {
217217 if ( annotation ) {
218218 const newPos = annotation . getPosition ( ) ;
219- if ( "x" in positionDiff ) {
220- newPos . x = positionDiff [ "x" ] [ 1 ] ;
219+ if ( "x" in attributesDiff ) {
220+ newPos . x = attributesDiff [ "x" ] [ 1 ] ;
221221 }
222- if ( "y" in positionDiff ) {
223- newPos . y = positionDiff [ "y" ] [ 1 ] ;
222+ if ( "y" in attributesDiff ) {
223+ newPos . y = attributesDiff [ "y" ] [ 1 ] ;
224224 }
225225 annotation . setPosition ( newPos . x , newPos . y ) ;
226+
227+ if ( "fontSize" in attributesDiff ) {
228+ annotation . setFontSize ( attributesDiff [ "fontSize" ] [ 1 ] ) ;
229+ }
226230 }
227231 } ,
228232
@@ -265,7 +269,7 @@ qx.Class.define("osparc.data.model.StudyUI", {
265269 if ( annotationId in annotations ) {
266270 const annotation = annotations [ annotationId ] ;
267271 if ( "attributes" in annotationDiff ) {
268- this . __updateAnnotationPositionFromDiff ( annotation , annotationDiff [ "attributes" ] ) ;
272+ this . __updateAnnotationAttributesFromDiff ( annotation , annotationDiff [ "attributes" ] ) ;
269273 }
270274 if ( "color" in annotationDiff ) {
271275 annotation . setColor ( annotationDiff [ "color" ] [ 1 ] ) ;
0 commit comments