Skip to content

Commit

Permalink
Also take into account translation of a element itself
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Oct 1, 2024
1 parent 1b386c7 commit d7d6cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nodes/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class GroupA extends Group {
const scale = context.pdf.internal.scaleFactor
const ph = context.pdf.internal.pageSize.getHeight()

context.pdf.link(scale*box[0], ph - scale*box[1], scale*box[2], scale*box[3], { url: href });
context.pdf.link(scale*(box[0] + context.transform.tx), ph - scale*(box[1] + context.transform.ty), scale*box[2], scale*box[3], { url: href })
}
}
}

0 comments on commit d7d6cd5

Please sign in to comment.