2024-03-12
10 months ago by Will Bishop
Stable release of `findEmptySpace()` helper method in Web SDK
What's new
findEmptySpace()
findEmptySpace()
With this release the findEmptySpace()
helper method has been promoted from experimental to stable.
Use the findEmptySpace()
method to identify an area on the board that doesn't overlap with existing board items. The method takes x
, y
parameters to define the starting point for finding empty space. You can also set a width
and height
value to define the size of the desired space, and optionally, an offset
value.
Example
const position = await miro.board.findEmptySpace({
x: 0,
y: 0,
width: 200,
height: 200,
});
await miro.board.createStickyNote({
content: "I'm not overlaping any existing widgets",
x: position.x,
y: position.y,
width: position.width,
});
For more information, see findEmptySpace()
.