2023-02-01 changelog
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
select and deselect board methodsThe Miro Web SDK 2.0 now enables programmatically selecting and deselecting board items with the select and deselect methods:
selectenables selecting one or more existing items on the board.
It's possible to select board items by item ID, item type, or tags.deselectenables 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
setZoom and getZoom viewport methodsBesides 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 as0.01(corresponds to 1%, as displayed on the board UI), or as large as4(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 between0.01and4included.
Miro Web SDK 2.0 supports items:create, items:delete, and experimental:items:update events
items:create, items:delete, and experimental:items:update eventsThe 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:createto 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:deleteto 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
Subscribe toexperimental:items:updateto 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
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>