Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { install } from 'sprite-extend-shapes'
import { Base } from './base'
import { Step } from './step'
import { Link } from './link'
import * as spritejs from 'spritejs'
import { _steps, _links, _workflow, _render, _isDragging, _hasLinkReject } from './symbolNames'
import * as functions from './functions'
import { getType } from './utils'
import { Ticks } from './ticks'
const { Scene } = spritejs;
spritejs.use(install);
class Workflow extends Base {
constructor(attrs) {
super(attrs);
/*****
* selector:cssιζ©ε¨
* size:canvas倧ε°
* zoom:ζ―ηΌ©ζΎ
* **/
this.ticks = new Ticks(); // θͺθΊ«ηticksε½ζ°ε€η
this.attr(Object.assign({
'selector': '',
'size': [ 600, 400 ],
'zoom': [ 0.5, 2 ]
}, attrs));
const { selector, size } = this.attr();
const scene = new Scene(selector, {
import * as spritejs from 'spritejs'
import shapes from '@spritejs/shapes'
import { getGlobal } from './util'
import * as core from './core'
import * as visuals from './visuals'
import * as plugins from './plugins'
import * as Theme from './themes'
spritejs.use(shapes)
core.Global.registerTheme('default', Theme.light)
core.Global.registerTheme('dark', Theme.dark)
const version = require('../package.json').version
export const qcharts = {
version,
...core,
...visuals,
...plugins
}
const global = getGlobal()
global.qcharts = qcharts