Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(options: CanvasEngineOptions = {}) {
super(options);
this.maxNumberPointsPerLink = 1000;
// create banks for the different factory types
this.nodeFactories = new FactoryBank();
this.linkFactories = new FactoryBank();
this.portFactories = new FactoryBank();
this.labelFactories = new FactoryBank();
const setup = (factory: FactoryBank) => {
factory.registerListener({
factoryAdded: event => {
event.factory.setDiagramEngine(this);
},
factoryRemoved: event => {
event.factory.setDiagramEngine(null);
}
});
};
setup(this.nodeFactories);
setup(this.linkFactories);
constructor(options: CanvasEngineOptions = {}) {
super(options);
this.maxNumberPointsPerLink = 1000;
// create banks for the different factory types
this.nodeFactories = new FactoryBank();
this.linkFactories = new FactoryBank();
this.portFactories = new FactoryBank();
this.labelFactories = new FactoryBank();
const setup = (factory: FactoryBank) => {
factory.registerListener({
factoryAdded: event => {
event.factory.setDiagramEngine(this);
},
factoryRemoved: event => {
event.factory.setDiagramEngine(null);
}
});
};
setup(this.nodeFactories);
setup(this.linkFactories);
setup(this.portFactories);
setup(this.labelFactories);
constructor(options: CanvasEngineOptions = {}) {
super(options);
this.maxNumberPointsPerLink = 1000;
// create banks for the different factory types
this.nodeFactories = new FactoryBank();
this.linkFactories = new FactoryBank();
this.portFactories = new FactoryBank();
this.labelFactories = new FactoryBank();
const setup = (factory: FactoryBank) => {
factory.registerListener({
factoryAdded: event => {
event.factory.setDiagramEngine(this);
},
factoryRemoved: event => {
event.factory.setDiagramEngine(null);
}
});
};
setup(this.nodeFactories);
constructor(options: CanvasEngineOptions = {}) {
super(options);
this.maxNumberPointsPerLink = 1000;
// create banks for the different factory types
this.nodeFactories = new FactoryBank();
this.linkFactories = new FactoryBank();
this.portFactories = new FactoryBank();
this.labelFactories = new FactoryBank();
const setup = (factory: FactoryBank) => {
factory.registerListener({
factoryAdded: event => {
event.factory.setDiagramEngine(this);
},
factoryRemoved: event => {
event.factory.setDiagramEngine(null);
}
});
};
setup(this.nodeFactories);
setup(this.linkFactories);
setup(this.portFactories);