Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function View(spec, options) {
var view = this;
options = options || {};
Dataflow.call(view);
if (options.loader) view.loader(options.loader);
if (options.logger) view.logger(options.logger);
if (options.logLevel != null) view.logLevel(options.logLevel);
view._el = null;
view._elBind = null;
view._renderType = options.renderer || RenderType.Canvas;
view._scenegraph = new Scenegraph();
var root = view._scenegraph.root;
// initialize renderer, handler and event management
view._renderer = null;
view._tooltip = options.tooltip || defaultTooltip,
view._redraw = true;
view._handler = new CanvasHandler().scene(root);
view._preventDefault = false;
view._timers = [];
view._eventListeners = [];
view._resizeListeners = [];
// initialize dataflow graph
var ctx = runtime(view, spec, options.functions);
view._runtime = ctx;
export default function View(spec, options) {
var view = this;
options = options || {};
Dataflow.call(view);
if (options.loader) view.loader(options.loader);
if (options.logger) view.logger(options.logger);
if (options.logLevel != null) view.logLevel(options.logLevel);
view._el = null;
view._elBind = null;
view._renderType = options.renderer || RenderType.Canvas;
view._scenegraph = new Scenegraph();
var root = view._scenegraph.root;
// initialize renderer, handler and event management
view._renderer = null;
view._tooltip = options.tooltip || defaultTooltip,
view._redraw = true;
view._handler = new CanvasHandler().scene(root);
view._preventDefault = false;
view._timers = [];
view._eventListeners = [];
view._resizeListeners = [];
// initialize event configuration
view._eventConfig = initializeEventConfig(spec.eventConfig);
export default function View(spec, options) {
var view = this;
options = options || {};
Dataflow.call(view);
view.loader(options.loader || view._loader);
view.logLevel(options.logLevel || 0);
view._el = null;
view._renderType = options.renderer || RenderType.Canvas;
view._scenegraph = new Scenegraph();
var root = view._scenegraph.root;
// initialize renderer, handler and event management
view._renderer = null;
view._redraw = true;
view._handler = new CanvasHandler().scene(root);
view._eventListeners = [];
view._preventDefault = false;
view._resizeListeners = []
// initialize dataflow graph
var ctx = runtime(view, spec, options.functions);
view._runtime = ctx;
view._signals = ctx.signals;
view._bind = (spec.bindings || []).map(function(_) {
export default async function(scaleFactor, opt) {
const r = await renderHeadless(this, RenderType.Canvas, scaleFactor, opt);
return r.canvas();
}
export default function(scaleFactor) {
return renderHeadless(this, RenderType.Canvas, scaleFactor)
.then(function(renderer) { return renderer.canvas(); });
}