mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fixes SVG transforms on restore
This commit is contained in:
parent
9a28b8a412
commit
834f466c05
1 changed files with 6 additions and 1 deletions
|
@ -132,6 +132,12 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||
restore: function SVGGraphics_restore() {
|
||||
this.transformMatrix = this.transformStack.pop();
|
||||
this.current = this.extraStack.pop();
|
||||
|
||||
this.tgrp = document.createElementNS(NS, 'svg:g');
|
||||
this.tgrp.setAttributeNS(null, 'id', 'transform');
|
||||
this.tgrp.setAttributeNS(null, 'transform',
|
||||
'matrix(' + this.transformMatrix + ')');
|
||||
this.pgrp.appendChild(this.tgrp);
|
||||
},
|
||||
|
||||
group: function SVGGraphics_group(items) {
|
||||
|
@ -669,7 +675,6 @@ var SVGGraphics = (function SVGGraphicsClosure(ctx) {
|
|||
},
|
||||
|
||||
rectangle: function SVGGraphics_rectangle(x, y, width, height) {
|
||||
this.save();
|
||||
var current = this.current;
|
||||
if (width < 0) {
|
||||
x = x + width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue