From 5671d5501e7a0b2bee1fe9ab8b12c7378a5a3e0c Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Tue, 2 Jan 2018 12:37:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BA=86editor=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E9=83=A8=E5=88=86=E5=8A=A8=E7=94=BB=20&=20fi?= =?UTF-8?q?x=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/vm.js | 1 + libs/core.js | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/_server/vm.js b/_server/vm.js index 4c1644bf..ba4e640e 100644 --- a/_server/vm.js +++ b/_server/vm.js @@ -168,6 +168,7 @@ var clear = new Vue({ methods: { clearMap: function(){ editor.mapInit(); + editor.updateMap(); clearTimeout(editArea.formatTimer); clearTimeout(tip.timer); pout.value = ''; diff --git a/libs/core.js b/libs/core.js index c659d2d6..12ac4980 100644 --- a/libs/core.js +++ b/libs/core.js @@ -3615,7 +3615,7 @@ core.prototype.isset = function (val) { ////// 播放背景音乐 ////// core.prototype.playBgm = function (bgm) { - + if (main.mode!='play')return; // 如果不允许播放 if (!core.musicStatus.bgmStatus) return; // 音频不存在 @@ -3666,7 +3666,7 @@ core.prototype.pauseBgm = function () { ////// 恢复背景音乐的播放 ////// core.prototype.resumeBgm = function () { - + if (main.mode!='play')return; // 如果不允许播放 if (!core.musicStatus.bgmStatus) return; @@ -3691,7 +3691,7 @@ core.prototype.resumeBgm = function () { ////// 播放音频 ////// core.prototype.playSound = function (sound) { - + if (main.mode!='play')return; // 如果不允许播放 if (!core.musicStatus.soundStatus) return; // 音频不存在 @@ -3730,6 +3730,11 @@ core.prototype.show = function (obj, speed, callback) { return; } obj.style.display = 'block'; + if (main.mode!='play'){ + obj.style.opacity = 1; + if (core.isset(callback)) {callback();} + return; + } obj.style.opacity = 0; var opacityVal = 0; var showAnimate = window.setInterval(function () { @@ -3750,6 +3755,11 @@ core.prototype.hide = function (obj, speed, callback) { obj.style.display = 'none'; return; } + if (main.mode!='play'){ + obj.style.display = 'none'; + if (core.isset(callback)) {callback();} + return; + } var opacityVal = 1; var hideAnimate = window.setInterval(function () { opacityVal -= 0.03;