Поправки багов
This commit is contained in:
@@ -130,21 +130,25 @@ class TextPage extends Vue {
|
||||
}
|
||||
|
||||
pageDown() {
|
||||
if (this.linesDown) {
|
||||
let i = this.pageLineCount;
|
||||
i--;
|
||||
if (this.linesDown && this.linesDown.length > i) {
|
||||
if (i >= 0 && this.linesDown.length > i) {
|
||||
this.bookPos = this.linesDown[i].begin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pageUp() {
|
||||
if (this.linesUp) {
|
||||
let i = this.pageLineCount;
|
||||
i--;
|
||||
i = (i > this.linesUp.length - 1 ? this.linesUp.length - 1 : i);
|
||||
if (this.linesUp && this.linesUp.length > i) {
|
||||
if (i >= 0 && this.linesUp.length > i) {
|
||||
this.bookPos = this.linesUp[i].begin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
keyHook(event) {
|
||||
if (event.type == 'keydown') {
|
||||
|
||||
@@ -6,8 +6,7 @@ export default class BookParser {
|
||||
// defaults
|
||||
this.p = 30;// px, отступ параграфа
|
||||
this.w = 300;// px, ширина страницы
|
||||
this.textAlignJustify = false;// выравнивание по ширине
|
||||
this.wordWrap = false;// перенос по слогам, если textAlignJustify = true
|
||||
this.wordWrap = false;// перенос по слогам
|
||||
|
||||
// заглушка
|
||||
this.measureText = (text, style) => {// eslint-disable-line no-unused-vars
|
||||
|
||||
Reference in New Issue
Block a user