Sugar Labs

Music Blocks Issue: blocks briefly appear in upper left

As per Music Blocks Issue #1919, when creating macros in Music Blocks, the individual blocks in the macro briefly appear in the upper left (position 0, 0) before being moved into place. This can be avoided by changing the creation position for the blocks to a position off screen.

For each block in macros.js, change the position of the block to 0, -1000 (with the exception of the top block in each stack, which should still be created at x, y).

For example:

const CLAPOBJ = [[0, 'playdrum', x, y, [null, 1, null]],
          [1, ['effectsname', {'value': 'clap'}], 0, 0, [0]]];

would change to

const CLAPOBJ = [[0, 'playdrum', x, y, [null, 1, null]],
          [1, ['effectsname', {'value': 'clap'}], 0, -1000, [0]]];

More details on the block structure can be found in README.md

Task tags

  • javascript

Students who completed this task

pidddgy

Task type

  • code Code
close

2019