Spaces:
Running
Running
File size: 1,285 Bytes
6bcb42f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import keyMirror from 'keymirror';
/**
* Names for each state of the stage size toggle
* @enum {string}
*/
const STAGE_SIZE_MODES = keyMirror({
/**
* The "large stage" button is pressed; the user would like a large stage.
*/
large: null,
/**
* The "small stage" button is pressed; the user would like a small stage.
*/
small: null
});
/**
* Names for each stage render size
* @enum {string}
*/
const STAGE_DISPLAY_SIZES = keyMirror({
/**
* Large stage with wide browser
*/
large: null,
/**
* Large stage with narrow browser
*/
largeConstrained: null,
/**
* Small stage (ignores browser width)
*/
small: null
});
// zoom level to start with
const BLOCKS_DEFAULT_SCALE = 0.675;
const STAGE_DISPLAY_SCALES = {};
STAGE_DISPLAY_SCALES[STAGE_DISPLAY_SIZES.large] = 1; // large mode, wide browser (standard)
STAGE_DISPLAY_SCALES[STAGE_DISPLAY_SIZES.largeConstrained] = 0.85; // large mode but narrow browser
STAGE_DISPLAY_SCALES[STAGE_DISPLAY_SIZES.small] = 0.5; // small mode, regardless of browser size
export default {
fullSizeMinWidth: 1096,
referenceWidth: 480
};
export {
BLOCKS_DEFAULT_SCALE,
STAGE_DISPLAY_SCALES,
STAGE_DISPLAY_SIZES,
STAGE_SIZE_MODES
};
|