Skip to content

Commit

Permalink
Merge pull request #4 from tmickel/feature/attach-flyout-listeners
Browse files Browse the repository at this point in the history
Attach flyout listeners to GUI workspace
  • Loading branch information
tmickel authored Oct 13, 2016
2 parents 2677e22 + 28e90eb commit 571eaa0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/vm-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const ScratchBlocks = require('scratch-blocks');
module.exports = {
attachWorkspace: function (vm, workspace) {
workspace.addChangeListener(vm.blockListener);
var flyoutWorkspace = workspace.getFlyout().getWorkspace();
flyoutWorkspace.addChangeListener(vm.flyoutBlockListener);
vm.on('STACK_GLOW_ON', data => workspace.glowStack(data.id, true));
vm.on('STACK_GLOW_OFF', data => workspace.glowStack(data.id, false));
vm.on('BLOCK_GLOW_ON', data => workspace.glowBlock(data.id, true));
Expand Down

0 comments on commit 571eaa0

Please # to comment.