2023-02-01 changelog

Miro Web SDK 2.0 supports 'select', 'deselect', 'setZoom', and 'getZoom' methods; 'items:create', 'experimental:items:update', 'items:delete' events; data URL images Miro Web SDK 2.0 supports select, deselect, setZoom, and getZoom methods; items:create, items:delete, and experimental:items:update events; data URL images

What's new

Miro Web SDK 2.0 supports select and deselect board methods

The Miro Web SDK 2.0 now enables programmatically selecting and deselecting board items with the select and deselect methods:

  • select enables selecting one or more existing items on the board.
    It's possible to select board items by item ID, item type, or tags.
  • deselect enables deselecting one or more currently selected items on the board.
    It's possible to deselect board items by specifying item ID, item type, or tags.

Miro Web SDK 2.0 supports setZoom and getZoom viewport methods

Besides the ability to zoom to a specific board item or to a group of items on the board, it's now possible to set the zoom level of the current viewport, as well as fetch it with the Web SDK:

  • setZoom takes zoomLevelas an argument.
    You can set a zoom level as small as 0.01 (corresponds to 1%, as displayed on the board UI), or as large as 4 (corresponds to 400%, as displayed on the board UI).
  • getZoom doesn't take any arguments.
    It returns the zoom level of the current viewport as a numeric value between 0.01 and 4 included.

Miro Web SDK 2.0 supports items:create, items:delete, and experimental:items:update events

The Miro Web SDK 2.0 now enables subscribing to and unsubscribing from events that fire when board items are created, updated, and deleted:

  • Subscribe to items:create to listen to an event that fires when the current user creates a new item on the board.
    The event returns an array with the newly created board items.
    You can add logic to perform actions after item creation, such as filtering specific item types, which you can then further process.
  • Subscribe to items:delete to listen to an event that fires when the current user deletes one or more items from the board.
    The event returns an array with the deleted board items.
    You can add logic to perform actions after item deletion, such as logging the deleted items.
  • Experimental feature Experimental
    Subscribe to experimental:items:update to listen to an event that fires when the current user moves, resizes, rotates, or changes the scale of one or more items on the board.
    The event returns an array with the updated board items.
    You can add logic to perform actions after the update, such as logging the updated items.

Miro Web SDK 2.0 supports data URL images

Experimental feature Experimental

When creating an image item, you can now specify the image url either as an HTTPS link pointing to the image, or as a base64 data URL string:

data:image/<image-MIME-type>;base64,<base64-encoded-string>