Merge pull request #146 from ckcz123/v2.0

fix editor bug
This commit is contained in:
Zhang Chen 2018-06-18 00:01:58 +08:00 committed by GitHub
commit ed959eccbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -411,6 +411,7 @@ if (location.protocol.indexOf("http")!=0) {
<script src='_server/editor_file.js'></script>
<script src='_server/editor_mode.js'></script>
<script src='_server/vm.js'></script>
<script src='libs/thirdparty/lz-string.min.js'></script>
<script id='mainScript' src='main.js'></script>
<script>
//所有全局量

View File

@ -384,8 +384,10 @@ maps.prototype.drawMap = function (mapName, callback) {
if (main.mode=='editor'){
main.editor.updateMap = function(){
core.removeGlobalAnimate(null, null, true);
core.clearMap('bg', 0, 0, 416, 416);
core.clearMap('event', 0, 0, 416, 416);
core.clearMap('event2', 0, 0, 416, 416);
drawBg();
drawEvent();
core.setGlobalAnimate(core.values.animateSpeed);
}