Created
December 30, 2022 07:54
-
-
Save rockitbaby/475e732d14c06c080cacbac9a73804c1 to your computer and use it in GitHub Desktop.
Miro Positioning Frame / Children
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in web developer toolbar | |
// manually create a frame, select the frame | |
ff = (await miro.board.getSelection())[0]; | |
// position the frame at the origin of the board | |
ff.x=0; ff.y=0; ff.sync(); | |
// manually create a sticky note outside of the frame, select the sticky note | |
sn = (await miro.board.getSelection())[0] | |
sn.parentId; // is null | |
// position the sticky note at the origin of the board | |
sn.x=0; sn.y=0; sn.sync(); | |
// => visisble on top of the frame | |
// add sticky not as child to frame | |
ff.add(sn); | |
ff.sync(); | |
// => now coordinates should be relative to top left of the frame? | |
// try to move sticky note | |
sn.x = 100; sn.y = 0; sn.sync(); | |
// => weired position outside of frame |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment