File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ <h3>Select presentation display from the list below</h3>
7676 TargetElement = document . getElementById ( "WebView" ) ;
7777 // Fix width but maintain aspect ratio
7878 TargetWidth = Math . floor ( 960 / ZoomFloat ) ;
79- TargetHeight = Math . floor ( TargetWidth / window . innerWidth * window . innerHeight ) ;
79+ TargetHeight = Math . floor ( TargetWidth / TargetElement . parentNode . Width * TargetElement . parentNode . Height ) ;
8080 // Fit to viewport
81- TargetScale = window . innerWidth / TargetWidth ;
81+ TargetScale = TargetElement . parentNode . Width / TargetWidth ;
8282 TargetElement . style . width = TargetWidth + "px" ;
8383 TargetElement . style . height = TargetHeight + "px" ;
8484 TargetElement . style . scale = ( TargetScale * 100 ) + "%" ;
You can’t perform that action at this time.
0 commit comments