There was an error while loading. Please reload this page.
1 parent fb50783 commit 8c67850Copy full SHA for 8c67850
1 file changed
libs/canvg_context2d/canvg.js
@@ -3238,11 +3238,16 @@
3238
}
3239
//ss end
3240
3241
- if (svg.opts['ignoreDimensions'] == true && e.style('width').hasValue() &&
3242
- e.style('height').hasValue()) {
3243
- cWidth = e.style('width').toPixels('x');
3244
- cHeight = e.style('height').toPixels('y');
3245
- }
+ //ss
+ if (svg.opts['ignoreDimensions'] == true && e.style('width').hasValue() && e.style('height').hasValue()) {
+ try {
+ cWidth = e.style('width').toPixels('x');
+ cHeight = e.style('height').toPixels('y');
3246
+ } catch (e) {
3247
+ // This will always fail with jsPDF, as no viewport is set
3248
+ }
3249
3250
+ //ss end
3251
svg.ViewPort.SetCurrent(cWidth, cHeight);
3252
3253
if (svg.opts['offsetX'] != null) e.attribute('x', true).value = svg.opts[
0 commit comments