diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 1145f8514..bad6a642d 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -271,8 +271,8 @@ class SkinCode extends defaultStyle { mergentR:4, // 站台折返策略边数 position: 0, // 折返方向 offset: {x: -16, y: -15}, // 折返偏移量 - noHumanColor: '#0F16DA', // 站台无人折返 - autoChangeEndsColor: '#0BF400' // 站台自动换端 + noHumanColor: '#0BF400', // 站台无人折返 + autoChangeEndsColor: '#0F16DA' // 站台自动换端 }, common: { // 通用属性 diff --git a/src/utils/screen.js b/src/utils/screen.js index 15a035cad..ac93e7b77 100644 --- a/src/utils/screen.js +++ b/src/utils/screen.js @@ -1,6 +1,6 @@ // 判断全屏模式是否是可用 export function isFullscreenEnabled() { - return document.fullscreenEnabled || + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled || document.msFullscreenEnabled || false; @@ -8,7 +8,7 @@ export function isFullscreenEnabled() { // 判断浏览器是否全屏 export function isFullscreen() { - return document.fullscreenElement || + return document.fullscreenElement || document.msFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || false; @@ -16,36 +16,36 @@ export function isFullscreen() { // 启动全屏 export function launchFullscreen() { - if (isFullscreenEnabled()) { - const element = document.documentElement; - if (element.requestFullScreen) { - element.requestFullScreen(); - } else if (element.mozRequestFullScreen) { - element.mozRequestFullScreen(); - } else if (element.msRequestFullscreen) { - element.msRequestFullscreen(); - } else if (element.oRequestFullscreen) { - element.oRequestFullscreen(); - } else if (element.webkitRequestFullScreen) { - element.webkitRequestFullScreen(); - } - } + if (isFullscreenEnabled()) { + const element = document.documentElement; + if (element.requestFullScreen) { + element.requestFullScreen(); + } else if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.msRequestFullscreen) { + element.msRequestFullscreen(); + } else if (element.oRequestFullscreen) { + element.oRequestFullscreen(); + } else if (element.webkitRequestFullScreen) { + element.webkitRequestFullScreen(); + } + } } // 退出全屏 export function exitFullscreen() { - if (isFullscreen()) { - if (document.exitFullscreen) { - document.exitFullscreen(); - } else if (document.msExitFullscreen) { - document.msExitFullscreen(); - } else if (document.mozCancelFullScreen) { - document.mozCancelFullScreen(); - } else if (document.mozExitFullScreen) { - document.mozExitFullScreen(); - } else if (document.webkitExitFullscreen) { - document.webkitExitFullscreen(); - } - } + if (isFullscreen()) { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.mozExitFullScreen) { + document.mozExitFullScreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + } }