refactor(book reader): simplify flipDirection

This commit is contained in:
Gauthier Roebroeck 2020-03-18 14:57:05 +08:00
parent 30e766be16
commit 8b1b7c1a99

View file

@ -448,13 +448,7 @@ export default Vue.extend({
}
},
flipDirection (): boolean {
switch (this.readingDirection) {
case ReadingDirection.LEFT_TO_RIGHT:
return false
case ReadingDirection.RIGHT_TO_LEFT:
default:
return true
}
return this.readingDirection === ReadingDirection.RIGHT_TO_LEFT
},
imageFit: {
get: function (): ImageFit {