How to use the blockly/dist.Events function in blockly

To help you get started, we’ve selected a few blockly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / blockly-samples / blockly-rtc / src / index.js View on Github external
eventQueue.forEach((workspaceAction)=> {
      Blockly.Events.disable();
      workspaceAction.event.run(workspaceAction.forward);
      Blockly.Events.enable();
    });
  };
github google / blockly-samples / blockly-rtc / src / websocket / workspace_client_handlers.js View on Github external
entry.events = entry.events.map((entry) => {
        return Blockly.Events.fromJson(entry, Blockly.getMainWorkspace());
      });
    });
github google / blockly-samples / blockly-rtc / src / index.js View on Github external
workspace.addChangeListener((event) => {
    if (event instanceof Blockly.Events.Ui) {
      return;
    };
    workspaceClient.activeChanges.push(event);
    if (!Blockly.Events.getGroup()) {
      workspaceClient.flushEvents();
    };
  });
github google / blockly-samples / blockly-rtc / src / http / workspace_client_handlers.js View on Github external
entry.events = entry.events.map((event) => {
      return Blockly.Events.fromJson(event, Blockly.getMainWorkspace());
    });
  });
github google / blockly-samples / blockly-rtc / src / WorkspaceClient.js View on Github external
beginWrite_() {
    this.writeInProgress = true;
    const entryId = this.workspaceId + ':' + this.counter;
    this.counter += 1;
    this.inProgress.push({
      events: Blockly.Events.filter(this.notSent, true),
      entryId: entryId
    });
    this.notSent = [];
  };