File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,6 @@ export default dispatch => () => {
1414 dispatch ( actions . resetLoadingProgress ( ) ) ;
1515 } , 300 ) ;
1616
17- if ( window . innerWidth <= 640 ) {
18- core . fitToWidth ( ) ;
19- } else {
20- core . fitToPage ( ) ;
21- }
22-
2317 if ( onFirstLoad ) {
2418 onFirstLoad = false ;
2519 // redaction button starts hidden. when the user first loads a document, check HashParams the first time
@@ -45,4 +39,4 @@ export default dispatch => () => {
4539 window . readerControl . serverFailed = false ;
4640
4741 $ ( document ) . trigger ( 'documentLoaded' ) ;
48- } ;
42+ } ;
Original file line number Diff line number Diff line change @@ -237,6 +237,12 @@ if (window.CanvasRenderingContext2D) {
237237 }
238238 } ;
239239
240+ if ( window . innerWidth <= 640 ) {
241+ core . fitToWidth ( ) ;
242+ } else {
243+ core . fitToPage ( ) ;
244+ }
245+
240246 $ ( document ) . trigger ( 'viewerLoaded' ) ;
241247 }
242248 ) ;
@@ -245,4 +251,4 @@ if (window.CanvasRenderingContext2D) {
245251
246252window . addEventListener ( 'hashchange' , ( ) => {
247253 window . location . reload ( ) ;
248- } ) ;
254+ } ) ;
You can’t perform that action at this time.
0 commit comments