Промежуточный коммит, работа над изображениями, небольшой рефакторинг попутно

This commit is contained in:
Book Pauk
2019-02-20 15:26:54 +07:00
parent 12e0f9459b
commit ae3dc9b22c
3 changed files with 59 additions and 29 deletions

View File

@@ -28,7 +28,7 @@ export default class DrawHelper {
let out = `<div class="layout" style="width: ${this.w}px; height: ${this.h}px;` +
` position: absolute; top: ${this.fontSize*this.textShift}px; color: ${this.textColor}; font: ${font}; ${justify}` +
` line-height: ${this.lineHeight}px;">`;
` line-height: ${this.lineHeight}px;">`;
let len = lines.length;
const lineCount = this.pageLineCount + (isScrolling ? 1 : 0);

View File

@@ -216,6 +216,9 @@ class TextPage extends Vue {
while (this.drawHelper.measureText(t, {}) < this.w) t += 'Щ';
this.parsed.maxWordLength = t.length - 1;
this.parsed.measureText = this.drawHelper.measureText.bind(this.drawHelper);
this.parsed.lineHeight = this.lineHeight;
this.parsed.showImages = true;
this.parsed.imageHeightLines = 100;
}
//statusBar