How to use the nbdime/lib/common/editor.EditorWidget.editors function in nbdime

To help you get started, we’ve selected a few nbdime 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 jupyter / nbdime / packages / webapp / src / app / staticdiff.ts View on Github external
function ensureRendered(callback: () => void): void {
  for (let e of EditorWidget.editors) {
    e.setOption('viewportMargin', Infinity);
  }
  window.requestAnimationFrame(() => {
    // Assume entire viewport has been rendered now
    callback();
    for (let e of EditorWidget.editors) {
      // Reset to default according to docs
      e.setOption('viewportMargin', 10);
    }
  });
}
github jupyter / nbdime / packages / webapp / src / app / staticdiff.ts View on Github external
window.requestAnimationFrame(() => {
    // Assume entire viewport has been rendered now
    callback();
    for (let e of EditorWidget.editors) {
      // Reset to default according to docs
      e.setOption('viewportMargin', 10);
    }
  });
}