Jelajahi Sumber

Поправки

Book Pauk 6 tahun lalu
induk
melakukan
33a2ca55f0

+ 1 - 1
client/components/Reader/TextPage/DrawHelper.js

@@ -97,7 +97,7 @@ export default class DrawHelper {
                 lineText += `${tOpen}${text}${tClose}`;
 
                 center = center || part.style.center;
-                space = (part.style.space > 0 ? part.style.space : space);
+                space = (part.style.space > space ? part.style.space : space);
 
                 //избражения
                 //image: {local: Boolean, inline: Boolean, id: String, imageLine: Number, lineCount: Number, paraIndex: Number},

+ 1 - 7
client/components/Reader/share/BookParser.js

@@ -366,13 +366,7 @@ export default class BookParser {
             }
 
             if (path.indexOf('/fictionbook/body/section') == 0) {
-                switch (tag) {
-                    case 'p':
-                        growParagraph(`${tOpen}${text}${tClose}`, text.length);
-                        break;
-                    default:
-                        growParagraph(`${tOpen}${text}${tClose}`, text.length);
-                }
+                growParagraph(`${tOpen}${text}${tClose}`, text.length);
             }
 
             if (binaryId) {