This commit is contained in:
YouWei Zhao 2018-05-11 15:15:42 +08:00
parent 4e1eafc2ba
commit b5c9df41a8
3 changed files with 68 additions and 23 deletions

View File

@ -342,25 +342,46 @@ table.row td {
#menuDiv * { margin: 0; padding: 0; }
#midMenu{
z-index: 101;
width: 10em;
background: rgba(255, 255, 255, 0.65);
background: #fff;
border-color: #ccc #666 #666 #ccc;
border-style: solid;
border-width: 1px;
cursor: default;
font: normal 13px Arial, sans-serif;
margin: 0;
outline: none;
padding: 4px 0;
position: absolute;
/* display: none; */
overflow-y: auto;
overflow-x: hidden;
max-height: 100%;
z-index: 101;
border-radius: 4px;
}
#midMenu ul{
width: 100%;
list-style: none;
border: 1px solid #000;
border-bottom: 0px;
}
#midMenu ul li{
/* height: 30px; */
/* font-size: 16px; */
#midMenu .menuitem{
color: #000;
/* line-height: 30px; */
/* text-align: center; */
border-bottom: 1px solid #000;
font: normal 13px Arial, sans-serif;
list-style: none;
margin: 0;
padding: 4px 7em 4px 28px;
white-space: nowrap;
/* padding-left: 12px; */
/* padding-right: 20px; */
}
#midMenu .menuitem:hover{
background-color: #d6e9f8;
border-color: #d6e9f8;
border-style: dotted;
border-width: 1px 0;
padding-bottom: 3px;
padding-top: 3px;
}
#midMenu .menuitem-content{
color: #000;
font: normal 13px Arial, sans-serif;
}
/* for vue dom */

View File

@ -633,9 +633,12 @@ editor.prototype.listen = function () {
editor.info = 0;
editor.pos=pos;
} else {
editor.info=editor.ids[editor.indexs[thisevent.idnum]];
var ids=editor.indexs[thisevent.idnum];
ids=ids[0]?ids[0]:ids;
editor.info=editor.ids[ids];
pos.x=editor.widthsX[thisevent.images][1];
pos.y=editor.info.y;
if(thisevent.images=='terrains')pos.y++;
ysize = thisevent.images.indexOf('48') === -1 ? 32 : 48;
}
setTimeout(function(){selectBox.isSelected = true;});
@ -647,6 +650,30 @@ editor.prototype.listen = function () {
editor_mode.onmode('emenyitem');
}
var copyLoc = document.getElementById('copyLoc');
copyLoc.onmousedown = function(e){
editor.hideMidMenu();
e.stopPropagation();
var thisevent = editor.map[editor.pos.y][editor.pos.x];
if(thisevent==0){
} else {
}
}
var moveLoc = document.getElementById('moveLoc');
moveLoc.onmousedown = function(e){
editor.hideMidMenu();
e.stopPropagation();
var thisevent = editor.map[editor.pos.y][editor.pos.x];
if(thisevent==0){
} else {
}
}
}//绑定事件
/*

View File

@ -268,12 +268,9 @@
</div>
<div id="menuDiv">
<div id="midMenu" style="display:none">
<ul>
<li id='chooseInRight'>在右侧选中</li>
<li id='copyLoc'>复制(未完成)</li>
<li id='moveLoc'>移动(未完成)</li>
<li>样式先不管了<br>( ╯-_-)╯┴—┴</li>
</ul>
<div id='chooseInRight' class="menuitem"><div class="menuitem-content">在右侧选中</div></div>
<div id='copyLoc' class="menuitem"><div class="menuitem-content">复制(未完成)</div></div>
<div id='moveLoc' class="menuitem"><div class="menuitem-content">移动(未完成)</div></div>
</div>
</div>
</div>