@@ -52,7 +52,7 @@ server.tool("create_frame", "Create a frame shape in Frame0. Must add a new page
5252    } ; 
5353    const  FRAME_SIZE  =  { 
5454        phone : {  width : 320 ,  height : 690  } , 
55-         tablet : {  width : 520 ,  height : 790  } , 
55+         tablet : {  width : 600 ,  height : 800  } , 
5656        desktop : {  width : 800 ,  height : 600  } , 
5757        browser : {  width : 800 ,  height : 600  } , 
5858        watch : {  width : 198 ,  height : 242  } , 
@@ -273,17 +273,20 @@ server.tool("create_line", "Create a line shape in Frame0.", {
273273        . optional ( ) 
274274        . default ( "#000000" ) 
275275        . describe ( "Stroke color in hex code of the line shape. (e.g., black) - temp string type" ) , 
276- } ,  async  ( {  name,  parentId,  x1,  y1,  x2,  y2,  strokeColor,  } )  =>  { 
276+ } ,  async  ( {  name,  parentId,  x1,  y1,  x2,  y2,  strokeColor } )  =>  { 
277277    try  { 
278278        const  shapeId  =  await  command ( apiPort ,  "shape:create-shape" ,  { 
279279            type : "Line" , 
280280            shapeProps : { 
281281                name, 
282-                 path : [ [ x1 ,  y1 ] ,  [ x2 ,  y2 ] ] , 
282+                 path : [ 
283+                     [ x1 ,  y1 ] , 
284+                     [ x2 ,  y2 ] , 
285+                 ] , 
283286                tailEndType : "flat" , 
284287                headEndType : "flat" , 
285288                strokeColor, 
286-                 lineType : "straight" 
289+                 lineType : "straight" , 
287290            } , 
288291            parentId, 
289292        } ) ; 
@@ -325,10 +328,11 @@ server.tool("create_polygon", "Create a polygon or polyline shape in Frame0.", {
325328        . optional ( ) 
326329        . default ( "#000000" ) 
327330        . describe ( "Stroke color in hex code of the line shape. (e.g., black) - temp string type" ) , 
328- } ,  async  ( {  name,  parentId,  points,  closed,  strokeColor,  } )  =>  { 
331+ } ,  async  ( {  name,  parentId,  points,  closed,  strokeColor } )  =>  { 
329332    try  { 
330333        const  path  =  points . map ( ( point )  =>  [ point . x ,  point . y ] ) ; 
331-         const  pathClosed  =  path [ 0 ] [ 0 ]  ===  path [ path . length  -  1 ] [ 0 ]  &&  path [ 0 ] [ 1 ]  ===  path [ path . length  -  1 ] [ 1 ] ; 
334+         const  pathClosed  =  path [ 0 ] [ 0 ]  ===  path [ path . length  -  1 ] [ 0 ]  && 
335+             path [ 0 ] [ 1 ]  ===  path [ path . length  -  1 ] [ 1 ] ; 
332336        if  ( closed  &&  ! pathClosed ) 
333337            path . push ( path [ 0 ] ) ; 
334338        const  shapeId  =  await  command ( apiPort ,  "shape:create-shape" ,  { 
@@ -339,7 +343,7 @@ server.tool("create_polygon", "Create a polygon or polyline shape in Frame0.", {
339343                tailEndType : "flat" , 
340344                headEndType : "flat" , 
341345                strokeColor, 
342-                 lineType : "straight" 
346+                 lineType : "straight" , 
343347            } , 
344348            parentId, 
345349        } ) ; 
@@ -493,7 +497,10 @@ server.tool("update_shape", "Update properties of a shape in Frame0.", {
493497    name : z . string ( ) . optional ( ) . describe ( "Name of the shape." ) , 
494498    width : z . number ( ) . optional ( ) . describe ( "Width of the shape." ) , 
495499    height : z . number ( ) . optional ( ) . describe ( "Height of the shape." ) , 
496-     fillColor : z . string ( ) . optional ( ) . describe ( "Fill color in hex code of the shape." ) , 
500+     fillColor : z 
501+         . string ( ) 
502+         . optional ( ) 
503+         . describe ( "Fill color in hex code of the shape." ) , 
497504    strokeColor : z 
498505        . string ( ) 
499506        . optional ( ) 
0 commit comments