追加素材
@@ -52,7 +52,7 @@
地图选点
0,0
diff --git a/_server/css/editor_mode.css b/_server/css/editor_mode.css index 3a6a86cc..1985bd23 100644 --- a/_server/css/editor_mode.css +++ b/_server/css/editor_mode.css @@ -13,6 +13,13 @@ .leftTab > :first-child{margin-top:5px;} .leftTab > :last-child{margin-bottom:5px;} +.leftTab { + left: 5px; + top: 10px; + width: 435px; +} + +/* #left1 { left: 5px; top: 650px; @@ -42,7 +49,7 @@ top: 1290px; width: 440px; } - + */ #left6 { left: 5px; /* top: 1930px; */ @@ -74,13 +81,13 @@ height: 700px; width: 940px; } - +/* #left8 { left: 900px; top: 1290px; width: 440px; } - + */ .etable table, .etable table td { color: #000; diff --git a/_server/editor.js b/_server/editor.js index 718199a7..72aee983 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -363,7 +363,7 @@ editor.prototype.listen = function() { if(!selectBox.isSelected) { var loc = eToLoc(e); var pos = locToPos(loc); - editor_mode.onmode('');//为了强制触发doAction + editor_mode.onmode('nextChange');//为了强制触发doAction editor_mode.onmode('loc'); editor_mode.loc(); tip.whichShow = 1; @@ -521,7 +521,7 @@ editor.prototype.listen = function() { } } tip.infos = JSON.parse(JSON.stringify(editor.info)); - editor_mode.onmode('');//为了强制触发doAction + editor_mode.onmode('nextChange');//为了强制触发doAction editor_mode.onmode('emenyitem'); editor_mode.emenyitem(); } diff --git a/_server/editor_mode.js b/_server/editor_mode.js index 9ad234e8..fa06fda7 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -7,7 +7,10 @@ function editor_mode(){ 'emenyitem':'left3', 'floor':'left4', 'tower':'left5', - 'functions':'left8' + 'functions':'left8', + + 'map':'left', + 'appendpic':'left1', } this._ids={} this.dom={} @@ -179,11 +182,20 @@ editor_mode.prototype.onmode = function (mode) { if (editor_mode.mode!=mode) { console.log('change mode into : '+mode); editor_mode.doActionList(editor_mode.mode,editor_mode.actionList); + if(editor_mode.mode==='nextChange' && mode)editor_mode.showMode(mode); editor_mode.mode=mode; editor_mode.actionList=[]; } } +editor_mode.prototype.showMode = function (mode) { + for(var name in this.dom){ + editor_mode.dom[name].style='z-index:-1;opacity: 0;'; + } + editor_mode.dom[mode].style=''; + document.getElementById('editModeSelect').value=mode; +} + editor_mode.prototype.loc = function(callback){ //editor.pos={x: 0, y: 0}; if (!core.isset(editor.pos))return; @@ -448,6 +460,12 @@ editor_mode.prototype.listen = function(callback){ }); } + var editModeSelect = document.getElementById('editModeSelect'); + editModeSelect.onchange = function(){ + editor_mode.onmode('nextChange'); + editor_mode.onmode(editModeSelect.value); + } + if (Boolean(callback))callback(); } diff --git a/_server/vm.js b/_server/vm.js index a034eaf6..de416fed 100644 --- a/_server/vm.js +++ b/_server/vm.js @@ -1,7 +1,20 @@ // vue 相关处理 document.body.onmousedown = function(e){ - selectBox.isSelected = false; + console.log(e); + var eid=[]; + e.path.forEach(function(node){ + if(!node.getAttribute)return; + var id_ = node.getAttribute('id'); + if (id_){ + if(['left','left1','left2','left3','left4','left5','left8'].indexOf(id_)!==-1)eid.push('edit'); + eid.push(id_); + } + }); + console.log(eid); + if(eid.indexOf('edit')===-1){ + if(eid.indexOf('tip')===-1)selectBox.isSelected = false; + } editor_mode.onmode(''); editor.info = {}; } diff --git a/editor.html b/editor.html index 73320236..2b59da98 100644 --- a/editor.html +++ b/editor.html @@ -8,7 +8,7 @@
@@ -52,7 +52,7 @@
0,0