Переделки debouncedPosChange

This commit is contained in:
Book Pauk
2019-02-02 18:39:38 +07:00
parent 0276bcb8b3
commit 98fd921f98
2 changed files with 14 additions and 9 deletions

View File

@@ -44,7 +44,7 @@ const minLayoutWidth = 100;
export default @Component({
watch: {
bookPos: function(newValue) {
this.debouncedEmitPosChange(newValue);
this.$emit('book-pos-changed', {bookPos: newValue, bookPosSeen: this.bookPosSeen});
this.draw();
},
settings: function() {
@@ -79,10 +79,6 @@ class TextPage extends Vue {
this.config = this.$store.state.config;
this.reader = this.$store.state.reader;
this.debouncedEmitPosChange = _.debounce((newValue) => {
this.$emit('book-pos-changed', {bookPos: newValue, bookPosSeen: this.bookPosSeen});
}, 1000);
this.debouncedStartClickRepeat = _.debounce((x, y) => {
this.startClickRepeat(x, y);
}, 800);