Facing issue in line widget style key "lineEndType":"opaque_block" not working in WEB or REST API

  • 15 November 2021
  • 2 replies
  • 25 views

Facing issue in line widget style key "lineEndType":"opaque_block" not working in WEB or REST API

 

bodyoption -->  {"type":"line","startWidget":{"id":"3074457367566661454"},"endWidget":{"id":"3074457367568133402"},"style":{"borderColor":"#009688","borderWidth":5,"lineStartType":"none","lineEndType":"opaque_block","lineType":"bezier"}}
res.body -->  {
  id: '3074457367566661461',
  startWidget: { id: '3074457367566661454' },
  endWidget: { id: '3074457367568133402' },
  style: {
    borderColor: '#009688',
    borderStyle: 'normal',
    borderWidth: 5,
    lineType: 'bezier'
  },
  type: 'line',
  createdAt: '2021-11-14T08:20:38Z',
  modifiedAt: '2021-11-14T08:20:38Z',
  modifiedBy: { type: 'user', name: 'Pratik Suthar', id: '307490306307' },
  createdBy: { type: 'user', name: 'Pratik Suthar', id: '30744573307' },
  capabilities: { editable: true }
}


2 replies

same issue! it was working before 

Thanks for brining this up! There is a bug with the REST API at the moment. That being said, you should be able to accomplish this via the Web SDK. This should work: 

await miro.board.widgets.create( {type:"line", startWidgetId: "3458764514867330592" , endWidgetId: "3458764514867330693", style:{ lineEndStyle: miro.enums.lineArrowheadStyle.FILLED_RHOMBUS } })

Keep in mind that when using this method via the Web SDK, that lineEndStyle receives an integer, not a string: https://developers.miro.com/docs/interface-ilinewidget#section-start-widget-id

 

Addison

 

 

Reply