From 37b96bb0bc68fa0cd1b1313a52ae2c5e1111bd51 Mon Sep 17 00:00:00 2001 From: sean Date: Sun, 30 Apr 2017 16:05:34 +0200 Subject: [PATCH] fix long lines in pdf list (fixes #3231) --- openslides/core/static/js/core/pdf.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 53d4fbf4d..c9f140f3c 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -743,21 +743,21 @@ angular.module('OpenSlidesApp.core.pdf', []) } break; case "br": + var brParent = element.parentNode; + var brParentNodeName = brParent.nodeName; //in case of inline-line-numbers and the os-line-break class ignore the break if ((lineNumberMode == "inline" && element.getAttribute("class") == "os-line-break") || (lineNumberMode == "outside" && element.getAttribute("class") == "os-line-break" && - element.parentNode.getAttribute("class") == "insert") || + brParent.getAttribute("class") == "insert") || (lineNumberMode == "outside" && element.getAttribute("class") == "os-line-break" && - element.parentNode.getAttribute("class") == "merge-before")) { + brParent.getAttribute("class") == "merge-before")) { break; } else { currentParagraph = create("text"); - if (lineNumberMode == "none") { - currentParagraph.margin = [0, 0, 0, 0]; - } else { + if (lineNumberMode == "outside" && brParentNodeName == ("INS" || "DEL")) { currentParagraph.margin = [20, 0, 0, 0]; } currentParagraph.lineHeight = 1.25;