Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.forEach(this.selection, (elem) => {
V(this.paper.findViewByModel(elem).el).toggleClass('selected', false);
});
this.selection = [];
_createCloneNode() {
const paper = this;
const viewportTransform = V(paper.viewport).attr('transform');
V(paper.viewport).attr('transform', '');
const graph = this.model;
const viewportBBox = graph.getBBox(graph.getElements());
const svgClone = paper.svg.cloneNode(true);
V(paper.viewport).attr('transform', viewportTransform || '');
V(svgClone).attr('width', '100%');
V(svgClone).attr('height', '100%');
V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);
return svgClone;
}
_createCloneNode() {
const paper = this;
const viewportTransform = V(paper.viewport).attr('transform');
V(paper.viewport).attr('transform', '');
const graph = this.model;
const viewportBBox = graph.getBBox(graph.getElements());
const svgClone = paper.svg.cloneNode(true);
V(paper.viewport).attr('transform', viewportTransform || '');
V(svgClone).attr('width', '100%');
V(svgClone).attr('height', '100%');
V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);
return svgClone;
}
_createCloneNode() {
const paper = this;
const viewportTransform = V(paper.viewport).attr('transform');
V(paper.viewport).attr('transform', '');
const graph = this.model;
const viewportBBox = graph.getBBox(graph.getElements());
const svgClone = paper.svg.cloneNode(true);
V(paper.viewport).attr('transform', viewportTransform || '');
V(svgClone).attr('width', '100%');
V(svgClone).attr('height', '100%');
V(svgClone).attr('viewBox', `${viewportBBox.x} ${viewportBBox.y} ${viewportBBox.width} ${viewportBBox.height}`);
return svgClone;
}