Merge branch 'master' of https://github.com/ckcz123/mota-js
This commit is contained in:
commit
d6cd835417
@ -5,7 +5,7 @@
|
|||||||
<style>
|
<style>
|
||||||
html,body,div,img{margin:0;padding:0;}
|
html,body,div,img{margin:0;padding:0;}
|
||||||
body{
|
body{
|
||||||
font-family: -apple-system,"Helvetica Neue",Helvetica,Arial,"PingFang SC","Hiragino Sans GB","WenQuanYi Micro Hei","Microsoft Yahei",sans-serif;
|
font-family: Roboto,"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;;
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
@ -44,10 +44,13 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-left: 22px;
|
margin-left: 22px;
|
||||||
margin-top: 21px;
|
margin-top: 23px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
font-size: 13.3333px;
|
font-size: 12.3px;
|
||||||
font-family: monospace;
|
font-family: 'Lucida Console', Monaco, monospace;
|
||||||
|
white-space: pre;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
#editTip{
|
#editTip{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -105,6 +108,7 @@
|
|||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
.files {
|
.files {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@ -189,8 +193,8 @@
|
|||||||
/* display: none; */
|
/* display: none; */
|
||||||
|
|
||||||
background-color:rgba(255, 255, 255, 0.0);
|
background-color:rgba(255, 255, 255, 0.0);
|
||||||
border: 2px solid rgb(87, 198, 232);
|
border: 2px solid #30DFF3;
|
||||||
box-shadow: 0px 0px 2px rgb(87, 198, 232);
|
box-shadow: 0px 0px 2px #30DFF3;
|
||||||
}
|
}
|
||||||
.warnText{
|
.warnText{
|
||||||
color: #D50000;
|
color: #D50000;
|
||||||
@ -207,6 +211,7 @@
|
|||||||
table, td {
|
table, td {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
cursor:crosshair;
|
||||||
}
|
}
|
||||||
table.col{
|
table.col{
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -237,6 +242,14 @@
|
|||||||
#mapColMark td{
|
#mapColMark td{
|
||||||
width: 29px;
|
width: 29px;
|
||||||
}
|
}
|
||||||
|
#mapColMark td:hover .colBlock{
|
||||||
|
position: absolute;
|
||||||
|
top: 19px;
|
||||||
|
height: 416px;
|
||||||
|
width: 32px;
|
||||||
|
z-index: 100;
|
||||||
|
background-color: rgba(38,166,154,.5);
|
||||||
|
}
|
||||||
table.row{
|
table.row{
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@ -244,7 +257,7 @@
|
|||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
table.row td{
|
table.row td{
|
||||||
background-color: #795548;
|
background-color: #4C221B;
|
||||||
}
|
}
|
||||||
#arrRowMark{
|
#arrRowMark{
|
||||||
top: 5px;
|
top: 5px;
|
||||||
@ -263,6 +276,14 @@
|
|||||||
#mapRowMark td{
|
#mapRowMark td{
|
||||||
height: 29px;
|
height: 29px;
|
||||||
}
|
}
|
||||||
|
#mapRowMark td:hover .rowBlock{
|
||||||
|
position: absolute;
|
||||||
|
left: 18px;
|
||||||
|
height: 32px;
|
||||||
|
width: 416px;
|
||||||
|
z-index: 100;
|
||||||
|
background-color: rgba(76,34,27,.5);
|
||||||
|
}
|
||||||
/* for vue dom */
|
/* for vue dom */
|
||||||
[v-cloak] {
|
[v-cloak] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
@ -301,7 +322,7 @@
|
|||||||
<p>图块索引:<span class="infoText">{{ infos['y'] }}</span></p>
|
<p>图块索引:<span class="infoText">{{ infos['y'] }}</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<p v-if="whichShow" v-bind:class="[ (whichShow%2) ? 'warnText' : 'successText']" >{{ mapMsg }}</p>
|
<p v-if="whichShow" v-bind:class="[ (whichShow%2) ? 'warnText' : 'successText']">{{ mapMsg }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input class='btn' id='clear' type="button" value="清除地图" v-on:click="clearMap"/>
|
<input class='btn' id='clear' type="button" value="清除地图" v-on:click="clearMap"/>
|
||||||
@ -367,14 +388,14 @@
|
|||||||
// 生成定位编号
|
// 生成定位编号
|
||||||
var colNum = ' ';
|
var colNum = ' ';
|
||||||
for(var i=0; i<13; i++){
|
for(var i=0; i<13; i++){
|
||||||
var tpl = '<td>'+i+'</td>';
|
var tpl = '<td>'+i+'<div class="colBlock" style="left:'+(i*32+1)+'px;"></div></td>';
|
||||||
colNum += tpl;
|
colNum += tpl;
|
||||||
}
|
}
|
||||||
arrColMark.innerHTML = '<tr>'+colNum+'</tr>';
|
arrColMark.innerHTML = '<tr>'+colNum+'</tr>';
|
||||||
mapColMark.innerHTML = '<tr>'+colNum+'</tr>';
|
mapColMark.innerHTML = '<tr>'+colNum+'</tr>';
|
||||||
var rowNum = ' ';
|
var rowNum = ' ';
|
||||||
for(var i=0; i<13; i++){
|
for(var i=0; i<13; i++){
|
||||||
var tpl = '<tr><td>'+i+'</td></tr>';
|
var tpl = '<tr><td>'+i+'<div class="rowBlock" style="top:'+(i*32+1)+'px;"></div></td></tr>';
|
||||||
rowNum += tpl;
|
rowNum += tpl;
|
||||||
}
|
}
|
||||||
arrRowMark.innerHTML = rowNum;
|
arrRowMark.innerHTML = rowNum;
|
||||||
@ -420,7 +441,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//预处理草的源图片
|
//预处理草的源图片
|
||||||
importGrass=function(){
|
importGrass=function(){
|
||||||
autotile = new Image();
|
autotile = new Image();
|
||||||
|
|
||||||
autotile.src = "images/autotile.png"
|
autotile.src = "images/autotile.png"
|
||||||
@ -591,8 +612,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -892,10 +912,10 @@
|
|||||||
document.body.onmousedown = function(e){
|
document.body.onmousedown = function(e){
|
||||||
selectBox.isSelected = false;
|
selectBox.isSelected = false;
|
||||||
info = {};
|
info = {};
|
||||||
canSelectAg = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
iconLib.onmousedown = function(e){
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
var exportM = new Vue({
|
var exportM = new Vue({
|
||||||
el: '#exportM',
|
el: '#exportM',
|
||||||
|
|
||||||
@ -904,7 +924,7 @@
|
|||||||
if(editArea.error) {
|
if(editArea.error) {
|
||||||
tip.whichShow = 3;
|
tip.whichShow = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var filestr='';
|
var filestr='';
|
||||||
for (var yy = 0; yy < 13; yy++){
|
for (var yy = 0; yy < 13; yy++){
|
||||||
filestr+='['
|
filestr+='['
|
||||||
@ -948,9 +968,10 @@
|
|||||||
formatTimer: null,
|
formatTimer: null,
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
mapArr: function () {
|
mapArr: function (val, oldval) {
|
||||||
var that = this;
|
var that = this;
|
||||||
if(that.mapArr !='' && that.formatArr()){
|
if(val=='') return;
|
||||||
|
if(that.formatArr()){
|
||||||
that.error = 0;
|
that.error = 0;
|
||||||
clearTimeout(that.formatTimer);
|
clearTimeout(that.formatTimer);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
@ -1007,7 +1028,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(var k=0; k<13; k++){
|
for(var k=0; k<13; k++){
|
||||||
formatArrStr += Array(Math.max(4-a[k].length,0)).join(' ')+parseInt(a[k])+(k==12?'':',');
|
var num = parseInt(a[k]);
|
||||||
|
formatArrStr += Array(Math.max(4-String(num).length,0)).join(' ')+num+(k==12?'':',');
|
||||||
}
|
}
|
||||||
formatArrStr += ']'+(i==12?'':',\n');
|
formatArrStr += ']'+(i==12?'':',\n');
|
||||||
}
|
}
|
||||||
@ -1055,6 +1077,7 @@
|
|||||||
ec = eventLayer.getContext('2d');
|
ec = eventLayer.getContext('2d');
|
||||||
ec.clearRect(0, 0, 416, 416);
|
ec.clearRect(0, 0, 416, 416);
|
||||||
clearTimeout(editArea.formatTimer);
|
clearTimeout(editArea.formatTimer);
|
||||||
|
clearTimeout(tip.timer);
|
||||||
pout.value = '';
|
pout.value = '';
|
||||||
editArea.mapArr = '';
|
editArea.mapArr = '';
|
||||||
tip.whichShow = 4;
|
tip.whichShow = 4;
|
||||||
@ -1102,13 +1125,14 @@
|
|||||||
var that = this;
|
var that = this;
|
||||||
that.mapMsg = '';
|
that.mapMsg = '';
|
||||||
that.msgs[4] = "复制失败!"+editTip.err;
|
that.msgs[4] = "复制失败!"+editTip.err;
|
||||||
if(that.whichShow)
|
|
||||||
that.mapMsg = that.msgs[that.whichShow-1];
|
|
||||||
|
|
||||||
clearTimeout(that.timer);
|
clearTimeout(that.timer);
|
||||||
that.timer = setTimeout(function() {
|
if(that.whichShow){
|
||||||
tip.whichShow = 0;
|
that.mapMsg = that.msgs[that.whichShow-1];
|
||||||
}, 5000); //5秒后自动清除
|
that.timer = setTimeout(function() {
|
||||||
|
if(!(that.whichShow%2))
|
||||||
|
that.whichShow = 0;
|
||||||
|
}, 5000); //5秒后自动清除success,warn不清除
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -1121,9 +1145,11 @@
|
|||||||
watch: {
|
watch: {
|
||||||
isSelected: function(){
|
isSelected: function(){
|
||||||
tip.isSelectedBlock = this.isSelected;
|
tip.isSelectedBlock = this.isSelected;
|
||||||
|
tip.whichShow = 0;
|
||||||
|
clearTimeout(tip.timer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user