Поправил бажок

This commit is contained in:
Book Pauk
2019-02-11 17:31:44 +07:00
parent 6954dde5df
commit 567564b5c4

View File

@@ -439,49 +439,51 @@ class Reader extends Vue {
} }
buttonClick(button) { buttonClick(button) {
switch (button) { const activeClass = this.buttonActiveClass(button);
case 'loader': if (!activeClass['tool-button-disabled'])
this.loaderToggle(); switch (button) {
break; case 'loader':
case 'undoAction': this.loaderToggle();
if (this.actionCur > 0) { break;
this.actionCur--; case 'undoAction':
this.bookPosChanged({bookPos: this.actionList[this.actionCur]}); if (this.actionCur > 0) {
} this.actionCur--;
break; this.bookPosChanged({bookPos: this.actionList[this.actionCur]});
case 'redoAction': }
if (this.actionCur < this.actionList.length - 1) { break;
this.actionCur++; case 'redoAction':
this.bookPosChanged({bookPos: this.actionList[this.actionCur]}); if (this.actionCur < this.actionList.length - 1) {
} this.actionCur++;
break; this.bookPosChanged({bookPos: this.actionList[this.actionCur]});
case 'fullScreen': }
this.fullScreenToggle(); break;
break; case 'fullScreen':
case 'setPosition': this.fullScreenToggle();
this.setPositionToggle(); break;
break; case 'setPosition':
case 'scrolling': this.setPositionToggle();
this.scrollingToggle(); break;
break; case 'scrolling':
case 'search': this.scrollingToggle();
this.searchToggle(); break;
break; case 'search':
case 'copyText': this.searchToggle();
this.copyTextToggle(); break;
break; case 'copyText':
case 'history': this.copyTextToggle();
this.historyToggle(); break;
break; case 'history':
case 'refresh': this.historyToggle();
if (this.mostRecentBook()) { break;
this.loadBook({url: this.mostRecentBook().url, force: true}); case 'refresh':
} if (this.mostRecentBook()) {
break; this.loadBook({url: this.mostRecentBook().url, force: true});
case 'settings': }
this.settingsToggle(); break;
break; case 'settings':
} this.settingsToggle();
break;
}
this.$refs[button].$el.blur(); this.$refs[button].$el.blur();
} }