Skip to content

Instantly share code, notes, and snippets.

@rockitbaby
Created December 30, 2022 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rockitbaby/475e732d14c06c080cacbac9a73804c1 to your computer and use it in GitHub Desktop.
Save rockitbaby/475e732d14c06c080cacbac9a73804c1 to your computer and use it in GitHub Desktop.
Miro Positioning Frame / Children
// 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