PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@expo/config-plugins/build/ios

Просмотр файла: Orientation.js

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getOrientation = getOrientation;
exports.setOrientation = setOrientation;
exports.LANDSCAPE_ORIENTATIONS = exports.PORTRAIT_ORIENTATIONS = exports.withOrientation = void 0;

function _iosPlugins() {
  const data = require("../plugins/ios-plugins");

  _iosPlugins = function () {
    return data;
  };

  return data;
}

const withOrientation = (0, _iosPlugins().createInfoPlistPlugin)(setOrientation, 'withOrientation');
exports.withOrientation = withOrientation;

function getOrientation(config) {
  var _config$orientation;

  return (_config$orientation = config.orientation) !== null && _config$orientation !== void 0 ? _config$orientation : null;
}

const PORTRAIT_ORIENTATIONS = ['UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown'];
exports.PORTRAIT_ORIENTATIONS = PORTRAIT_ORIENTATIONS;
const LANDSCAPE_ORIENTATIONS = ['UIInterfaceOrientationLandscapeLeft', 'UIInterfaceOrientationLandscapeRight'];
exports.LANDSCAPE_ORIENTATIONS = LANDSCAPE_ORIENTATIONS;

function getUISupportedInterfaceOrientations(orientation) {
  if (orientation === 'portrait') {
    return PORTRAIT_ORIENTATIONS;
  } else if (orientation === 'landscape') {
    return LANDSCAPE_ORIENTATIONS;
  } else {
    return [...PORTRAIT_ORIENTATIONS, ...LANDSCAPE_ORIENTATIONS];
  }
}

function setOrientation(config, infoPlist) {
  const orientation = getOrientation(config);
  return { ...infoPlist,
    UISupportedInterfaceOrientations: getUISupportedInterfaceOrientations(orientation)
  };
}
//# sourceMappingURL=Orientation.js.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!