mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-11-25 08:38:30 -05:00
Merge pull request #192 from Murkantilism/develop
Replaced hardcoded value of 136 with a variable.
This commit is contained in:
commit
2da0c818bf
2 changed files with 3 additions and 2 deletions
|
@ -20,7 +20,7 @@ import Paint from '../../painteditor/Paint';
|
|||
import Events from '../../utils/Events';
|
||||
import Localization from '../../utils/Localization';
|
||||
import ScratchAudio from '../../utils/ScratchAudio';
|
||||
import {frame, gn, CSSTransition, localx, newHTML, scaleMultiplier, getIdFor, isTablet, newDiv,
|
||||
import {frame, gn, CSSTransition, localx, newHTML, scaleMultiplier, fullscreenScaleMultiplier, getIdFor, isTablet, newDiv,
|
||||
newTextInput, isAndroid, getDocumentWidth, getDocumentHeight, setProps, globalx} from '../../utils/lib';
|
||||
|
||||
let projectNameTextInput = null;
|
||||
|
@ -809,7 +809,7 @@ export default class UI {
|
|||
gn(list[i]).className = gn(list[i]).className + ' presentationmode';
|
||||
frame.appendChild(gn(list[i]));
|
||||
}
|
||||
var scale = Math.min((w - (136 * scaleMultiplier)) / gn('stage').owner.width, h / gn('stage').owner.height);
|
||||
var scale = Math.min((w - (fullscreenScaleMultiplier * scaleMultiplier)) / gn('stage').owner.width, h / gn('stage').owner.height);
|
||||
var dx = Math.floor((w - (gn('stage').owner.width * scale)) / 2);
|
||||
var dy = Math.floor((h - (gn('stage').owner.height * scale)) / 2);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ export const DEGTOR = Math.PI / 180;
|
|||
export const WINDOW_INNER_HEIGHT = window.innerHeight;
|
||||
export const WINDOW_INNER_WIDTH = window.innerWidth;
|
||||
export const scaleMultiplier = WINDOW_INNER_HEIGHT / 768.0;
|
||||
export const fullscreenScaleMultiplier = 136;
|
||||
|
||||
export const isiOS = (typeof AndroidInterface == 'undefined');
|
||||
export const isAndroid = (typeof AndroidInterface != 'undefined');
|
||||
|
|
Loading…
Reference in a new issue