How to use the vega-dataflow.Dataflow.prototype function in vega-dataflow

To help you get started, we’ve selected a few vega-dataflow 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 vega / vega / packages / vega-view / src / View.js View on Github external
prototype.evaluate = async function(encode, prerun, postrun) {
  // evaluate dataflow and prerun
  await Dataflow.prototype.evaluate.call(this, encode, prerun);

  // render as needed
  if (this._redraw || this._resize) {
    try {
      if (this._renderer) {
        if (this._resize) {
          this._resize = 0;
          resizeRenderer(this);
        }
        await this._renderer.renderAsync(this._scenegraph.root);
      }
      this._redraw = false;
    } catch (e) {
      this.error(e);
    }
  }
github vega / vega / packages / vega-view / src / View.js View on Github external
prototype.evaluate = async function(encode, prerun, postrun) {
  // evaluate dataflow and prerun
  await Dataflow.prototype.evaluate.call(this, encode, prerun);

  // render as needed
  if (this._redraw || this._resize) {
    try {
      if (this._renderer) {
        if (this._resize) {
          this._resize = 0;
          resizeRenderer(this);
        }
        await this._renderer.renderAsync(this._scenegraph.root);
      }
      this._redraw = false;
    } catch (e) {
      this.error(e);
    }
  }
github vega / vega / src / View.js View on Github external
prototype.run = function() {
  Dataflow.prototype.run.call(this);
  if (!this._queue || this._queue.length) {
    this.render(this._queue);
    this._queue = [];
  }
  return this;
};
github vega / vega / packages / vega-view / src / View.js View on Github external
prototype.loader = function(loader) {
  if (!arguments.length) return this._loader;
  if (loader !== this._loader) {
    Dataflow.prototype.loader.call(this, loader);
    this._resetRenderer();
  }
  return this;
};
github vega / vega-view / src / View.js View on Github external
prototype.loader = function(loader) {
  if (!arguments.length) return this._loader;
  if (loader !== this._loader) {
    Dataflow.prototype.loader.call(this, loader);
    if (this._renderer) {
      this._renderer = null;
      this.initialize(this._el);
    }
  }
  return this;
};
github vega / vega / src / view / View.js View on Github external
prototype.run = function() {
  var numOps = Dataflow.prototype.run.call(this);
  if (numOps && (!this._queue || this._queue.length)) {
    this.render(this._queue);
    this._queue = [];
  }
  return this;
};
github vega / vega / packages / vega-view / src / View.js View on Github external
prototype.loader = function(loader) {
  if (!arguments.length) return this._loader;
  if (loader !== this._loader) {
    Dataflow.prototype.loader.call(this, loader);
    this._resetRenderer();
  }
  return this;
};
github vega / vega-view / src / View.js View on Github external
prototype.run = function(encode) {
  Dataflow.prototype.run.call(this, encode);
  if (this._redraw || this._resize) {
    try {
      this.render();
    } catch (e) {
      this.error(e);
    }
  }
  return this;
};