Skip to content

Commit

Permalink
Fix printing on the edge
Browse files Browse the repository at this point in the history
  • Loading branch information
MikDal002 committed Apr 19, 2024
1 parent fbb5cc0 commit 29e53d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ export class Book {
? drawSewingMarks(
sigDetails[i],
positions[i],
papersize,
sewingMarks.amount,
sewingMarks.marginPt,
sewingMarks.tapeWidthPt
Expand Down
6 changes: 4 additions & 2 deletions src/utils/drawing.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ export function drawCropmarks(papersize, per_sheet) {
/**
* @param {@param {import("../book.js").PageInfo}} sigDetails - information about signature where marks will be printed
* @param {import("../book.js").Position} position - position info object
* @param {number[]} papersize - paper dimensions
* @param {number} amount - amount of sewing crosses.
* @param {number} marginPt - distance from the end of sheet of paper to kettle mark
* @param {number} tapeWidthPt - distance between two points in a single sewwing cross.
* @returns {Point[]}
*/
export function drawSewingMarks(sigDetails, position, papersize, amount, marginPt, tapeWidthPt) {
export function drawSewingMarks(sigDetails, position, amount, marginPt, tapeWidthPt) {
// Here normalize coordinates to always think in x an y like this
// | P |H| P |
// | A |E| A |
Expand All @@ -139,6 +138,9 @@ export function drawSewingMarks(sigDetails, position, papersize, amount, marginP
// | |T| |
// |-POSITION-| | |

// Left pages has spine position on the endge :/
if (position.isLeftPage) return []

var arePageRotated = Math.abs(position.rotation) === 90;
let totalSpineHeight = 0;
let spinePosition = 0;
Expand Down

0 comments on commit 29e53d9

Please sign in to comment.