@@ -345,7 +345,7 @@ function disposeImages(data = false)
345345 imageElements [ key1 ] [ key2 ] . push ( image . firstElementChild ) ;
346346 }
347347
348- let readingNotEnlargeMoreThanOriginalSize = ( _config . readingNotEnlargeMoreThanOriginalSize || _config . readingWebtoon ) ? true : false ;
348+ let readingNotEnlargeMoreThanOriginalSize = _config . readingNotEnlargeMoreThanOriginalSize ? true : false ;
349349
350350 for ( let key1 in _imagesDistribution )
351351 {
@@ -3097,6 +3097,8 @@ function changePagesView(mode, value, save)
30973097 if ( currentScale != 1 )
30983098 reading . resetZoom ( true , false , false ) ;
30993099
3100+ const imageIndex = reloadIndex ( ) ;
3101+
31003102 if ( mode == 0 )
31013103 {
31023104 let selectTab = document . querySelector ( '#reading-pages .tabs > div > div.active' ) . dataset . name ;
@@ -3105,7 +3107,7 @@ function changePagesView(mode, value, save)
31053107 if ( readingIsEbook ) handlebarsContext . loading = true ;
31063108 template . loadContentRight ( 'reading.content.right.html' , true ) ;
31073109
3108- reading . reload ( ) ;
3110+ reading . reload ( false , imageIndex ) ;
31093111 }
31103112 else if ( mode == 1 ) // Set the scroll mode
31113113 {
@@ -3122,7 +3124,7 @@ function changePagesView(mode, value, save)
31223124 if ( readingIsEbook ) handlebarsContext . loading = true ;
31233125 template . loadContentRight ( 'reading.content.right.html' , true ) ;
31243126
3125- reading . reload ( ) ;
3127+ reading . reload ( false , imageIndex ) ;
31263128 }
31273129 else if ( mode == 2 ) // Sets the margin of the pages
31283130 {
@@ -3140,7 +3142,7 @@ function changePagesView(mode, value, save)
31403142 if ( readingIsEbook ) handlebarsContext . loading = true ;
31413143 template . loadContentRight ( 'reading.content.right.html' , true ) ;
31423144
3143- reading . reload ( ) ;
3145+ reading . reload ( false , imageIndex ) ;
31443146 }
31453147 else if ( mode == 4 ) // Set the speed of the animation when changing pages
31463148 {
@@ -3162,7 +3164,7 @@ function changePagesView(mode, value, save)
31623164 if ( readingIsEbook ) handlebarsContext . loading = true ;
31633165 template . loadContentRight ( 'reading.content.right.html' , true ) ;
31643166
3165- reading . reload ( ) ;
3167+ reading . reload ( false , imageIndex ) ;
31663168 }
31673169 else if ( mode == 7 ) // Disables double-page reading in horizontal images
31683170 {
@@ -3171,12 +3173,10 @@ function changePagesView(mode, value, save)
31713173 if ( readingIsEbook ) handlebarsContext . loading = true ;
31723174 template . loadContentRight ( 'reading.content.right.html' , true ) ;
31733175
3174- reading . reload ( ) ;
3176+ reading . reload ( false , imageIndex ) ;
31753177 }
31763178 else if ( mode == 8 ) // Manga reading, invert the direction and double pages
31773179 {
3178- const imageIndex = reloadIndex ( ) ;
3179-
31803180 updateReadingPagesConfig ( 'readingManga' , value ) ;
31813181
31823182 if ( readingIsEbook ) handlebarsContext . loading = true ;
@@ -3190,7 +3190,13 @@ function changePagesView(mode, value, save)
31903190
31913191 if ( value )
31923192 {
3193- template . globalElement ( '.reading-view, .reading-reading-manga, .reading-double-page, .reading-do-not-apply-to-horizontals, .reading-blank-page, .reading-align-with-next-horizontal, .reading-ajust-to-width, .reading-not-enlarge-more-than-original-size, .reading-margin-vertical, .reading-force-single-page' ) . addClass ( 'disable-pointer' ) ;
3193+ template . globalElement ( '.reading-view, .reading-reading-manga, .reading-double-page, .reading-do-not-apply-to-horizontals, .reading-blank-page, .reading-align-with-next-horizontal, .reading-ajust-to-width, .reading-margin-vertical, .reading-force-single-page' ) . addClass ( 'disable-pointer' ) ;
3194+
3195+ if ( ! _config . readingNotEnlargeMoreThanOriginalSize )
3196+ {
3197+ events . swiftClick . call ( template . _globalElement ( ) . querySelector ( '.reading-not-enlarge-more-than-original-size .switch' ) ) ;
3198+ updateReadingPagesConfig ( 'readingNotEnlargeMoreThanOriginalSize' , true ) ;
3199+ }
31943200 }
31953201 else
31963202 {
@@ -3200,13 +3206,13 @@ function changePagesView(mode, value, save)
32003206 if ( _config . readingDoublePage )
32013207 template . globalElement ( '.reading-do-not-apply-to-horizontals, .reading-blank-page, .reading-align-with-next-horizontal' ) . removeClass ( 'disable-pointer' ) ;
32023208
3203- template . globalElement ( '.reading-view, .reading-reading-manga, .reading-double-page, .reading-not-enlarge-more-than-original-size, .reading- margin-vertical' ) . removeClass ( 'disable-pointer' ) ;
3209+ template . globalElement ( '.reading-view, .reading-reading-manga, .reading-double-page, .reading-margin-vertical' ) . removeClass ( 'disable-pointer' ) ;
32043210 }
32053211
32063212 if ( readingIsEbook ) handlebarsContext . loading = true ;
32073213 template . loadContentRight ( 'reading.content.right.html' , true ) ;
32083214
3209- reading . reload ( ) ;
3215+ reading . reload ( false , imageIndex ) ;
32103216 }
32113217 else if ( mode == 10 ) // Set horizontal margin of the pages
32123218 {
@@ -3237,7 +3243,7 @@ function changePagesView(mode, value, save)
32373243 if ( readingIsEbook ) handlebarsContext . loading = true ;
32383244 template . loadContentRight ( 'reading.content.right.html' , true ) ;
32393245
3240- reading . reload ( ) ;
3246+ reading . reload ( false , imageIndex ) ;
32413247 }
32423248 else if ( mode == 13 ) // Set width adjustment
32433249 {
@@ -3251,7 +3257,7 @@ function changePagesView(mode, value, save)
32513257 else
32523258 template . globalElement ( '.reading-horizontals-margin' ) . addClass ( 'disable-pointer' ) ;
32533259
3254- reading . reload ( ) ;
3260+ reading . reload ( false , imageIndex ) ;
32553261 }
32563262 else if ( mode == 14 ) // Set horizontal margin of the horizontals pages
32573263 {
@@ -3307,7 +3313,7 @@ function changePagesView(mode, value, save)
33073313 if ( readingIsEbook ) handlebarsContext . loading = true ;
33083314 template . loadContentRight ( 'reading.content.right.html' , true ) ;
33093315
3310- reading . reload ( ) ;
3316+ reading . reload ( false , imageIndex ) ;
33113317 }
33123318 else if ( mode == 19 ) // Rotate horizontal images
33133319 {
@@ -3316,7 +3322,7 @@ function changePagesView(mode, value, save)
33163322 if ( readingIsEbook ) handlebarsContext . loading = true ;
33173323 template . loadContentRight ( 'reading.content.right.html' , true ) ;
33183324
3319- reading . reload ( ) ;
3325+ reading . reload ( false , imageIndex ) ;
33203326 }
33213327 else if ( mode == 20 ) // Force show single page in scroll mode
33223328 {
@@ -3336,7 +3342,7 @@ function changePagesView(mode, value, save)
33363342 if ( readingIsEbook ) handlebarsContext . loading = true ;
33373343 template . loadContentRight ( 'reading.content.right.html' , true ) ;
33383344
3339- reading . reload ( ) ;
3345+ reading . reload ( false , imageIndex ) ;
33403346 }
33413347}
33423348
0 commit comments