From 704d75271e86ba66bd9128ae3facb5a87466d552 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Thu, 14 Jan 2021 15:05:36 +0800 Subject: [PATCH] Fix V273 --- _server/css/editor_mobile.css | 3 ++- libs/core.js | 1 + libs/maps.js | 14 +++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 60b83a54..78604c15 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -539,7 +539,8 @@ table.row,div.row .rowtext { position: fixed; width: 100%; height: 100%; - overflow: hidden; + overflow-x: hidden; + overflow-y: auto; } #left6 h3{ font-size: 6vw; diff --git a/libs/core.js b/libs/core.js index 650be1e3..9535eb28 100644 --- a/libs/core.js +++ b/libs/core.js @@ -340,6 +340,7 @@ core.prototype._init_platform = function () { try { core.musicStatus.audioContext = new window.AudioContext(); core.musicStatus.gainNode = core.musicStatus.audioContext.createGain(); + core.musicStatus.gainNode.gain.value = core.musicStatus.userVolume; core.musicStatus.gainNode.connect(core.musicStatus.audioContext.destination); } catch (e) { console.log("该浏览器不支持AudioContext"); diff --git a/libs/maps.js b/libs/maps.js index 58eb63e7..29e06a05 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -115,12 +115,20 @@ maps.prototype.extractBlocksForUI = function (map, flags) { var floorId = map.floorId; var decompressed = this.decompressMap(map.map, floorId); map.blocks = []; - var mw = core.floors[floorId].width; - var mh = core.floors[floorId].height; + var floor = core.floors[floorId]; + var mw = floor.width; + var mh = floor.height; for (var i = 0; i < mh; i++) { for (var j = 0; j < mw; j++) { var number = (decompressed[i] || [])[j] || 0; - if (!number || number == 17 || this.isMapBlockDisabled(floorId, j, i, flags)) continue; + if (!number || number == 17) continue; + var isDisabled = this.isMapBlockDisabled(floorId, j, i, flags); + if (isDisabled) continue; + if (isDisabled == null) { + // 检查是否初始禁用 + var event = (floor.events || {})[j + "," + i]; + if (event != null && event.enable === false) continue; + } map.blocks.push(Object.assign({}, this.getBlockByNumber(number), {x: j, y: i})); } }