mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-26 00:39:58 +00:00
fix(viewer): use active plane for svg export
This commit is contained in:
parent
c4db7061a7
commit
069b1902c9
@ -439,7 +439,7 @@ BaseViewer.prototype.saveSVG = wrapForCompatibility(function saveSVG(options) {
|
||||
try {
|
||||
var canvas = self.get('canvas');
|
||||
|
||||
var contentNode = canvas.getDefaultLayer(),
|
||||
var contentNode = canvas.getActiveLayer(),
|
||||
defsNode = domQuery('defs', canvas._svg);
|
||||
|
||||
var contents = innerSVG(contentNode),
|
||||
|
@ -1432,6 +1432,9 @@ describe('Viewer', function() {
|
||||
expect(svg.indexOf('<svg width="100%" height="100%">')).to.equal(-1);
|
||||
expect(svg.indexOf('<g class="viewport"')).to.equal(-1);
|
||||
|
||||
// expect svg to not be empty
|
||||
expect(svg.indexOf('<g')).not.to.equal(-1);
|
||||
|
||||
var parser = new DOMParser();
|
||||
var svgNode = parser.parseFromString(svg, 'image/svg+xml');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user