From 3cb07c97dc3292902c1ed0b24ed495d5c9e6b980 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Wed, 19 Apr 2017 16:23:57 +0200 Subject: [PATCH] Added more distance in motion PDF for DEL-tags in new lines (fixes #3205). --- CHANGELOG | 1 + openslides/core/static/js/core/pdf.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 114b67412..4141b1dc9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ Motions: added local transformation [#3181] - Added support for export motions in a zip archive [#3189]. - Bugfix: changing motion line length did not invalidate cache [#3202] +- Bugfix: Added more distance in motion PDF for DEL-tags in new lines [#3211]. Core: - No reload on logoff. OpenSlides is now a full single page diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 45cd8bbda..8e02663ac 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -681,13 +681,19 @@ angular.module('OpenSlidesApp.core.pdf', []) break; case "br": //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.tagName == "INS") || - (lineNumberMode == "outside" && element.getAttribute("class") == "os-line-break" && element.parentNode.getAttribute("class") == "merge-before")) { + if ((lineNumberMode == "inline" && + element.getAttribute("class") == "os-line-break") || + (lineNumberMode == "outside" && + element.getAttribute("class") == "os-line-break" && + element.parentNode.getAttribute("class") == "insert") || + (lineNumberMode == "outside" && + element.getAttribute("class") == "os-line-break" && + element.parentNode.getAttribute("class") == "merge-before")) { break; } else { currentParagraph = create("text"); currentParagraph.lineHeight = 1.25; + currentParagraph.margin = [20, 0, 0, 0]; alreadyConverted.push(currentParagraph); } break; @@ -719,7 +725,8 @@ angular.module('OpenSlidesApp.core.pdf', []) if (element.childNodes.length > 0) { //if we hit = 0, the code would fail // add empty line number column for inline diff or pragraph diff mode if (element.childNodes[0].tagName === "INS" || - element.getAttribute("class") === "insert") { + element.getAttribute("class") === "insert" || + element.childNodes[0].tagName === "DEL") { var pLineNumberPlaceholder = { width: 20, text: "",