Merge pull request #3235 from tsiegleauq/issue3231-long-lines-in-lists

fix long lines in pdf list (fixes #3231)
This commit is contained in:
Norman Jäckel 2017-05-08 13:06:48 +02:00 committed by GitHub
commit 2833341867

View File

@ -743,21 +743,21 @@ angular.module('OpenSlidesApp.core.pdf', [])
} }
break; break;
case "br": 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 //in case of inline-line-numbers and the os-line-break class ignore the break
if ((lineNumberMode == "inline" && if ((lineNumberMode == "inline" &&
element.getAttribute("class") == "os-line-break") || element.getAttribute("class") == "os-line-break") ||
(lineNumberMode == "outside" && (lineNumberMode == "outside" &&
element.getAttribute("class") == "os-line-break" && element.getAttribute("class") == "os-line-break" &&
element.parentNode.getAttribute("class") == "insert") || brParent.getAttribute("class") == "insert") ||
(lineNumberMode == "outside" && (lineNumberMode == "outside" &&
element.getAttribute("class") == "os-line-break" && element.getAttribute("class") == "os-line-break" &&
element.parentNode.getAttribute("class") == "merge-before")) { brParent.getAttribute("class") == "merge-before")) {
break; break;
} else { } else {
currentParagraph = create("text"); currentParagraph = create("text");
if (lineNumberMode == "none") { if (lineNumberMode == "outside" && brParentNodeName == ("INS" || "DEL")) {
currentParagraph.margin = [0, 0, 0, 0];
} else {
currentParagraph.margin = [20, 0, 0, 0]; currentParagraph.margin = [20, 0, 0, 0];
} }
currentParagraph.lineHeight = 1.25; currentParagraph.lineHeight = 1.25;