From 667448800fc5f50f96fdcb7276a91f6558a1a2ed Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Sat, 28 Jul 2018 19:23:16 +0800 Subject: [PATCH 1/2] fix ColMark,RowMark --- README.md | 2 +- _server/css/editor_mobile.css | 18 ++++++++++++++++++ editor-mobile.html | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6738ca64..90b43e5e 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ HTML5魔塔交流群群号: `539113091` [@zhaouv](https://github.com/zhaouv) V2.0的推动者,可视化地图编辑器和事件编辑器的制作者,手机端魔塔制作界面的编写者。现在我们能在V2.0用到方便快捷的可视化地图编辑器,以及通过拖动图块来编写事件,能在手机端造塔等,都需要归功于zhaouv的贡献。 -[@iEcho](https://github.com/iEcho) V2.0的推动者,可视化地图编辑器的制作者,游戏界面自适应匹配的编写者。和zhaouv一起推动和开发了V2.0的制作。 +[@i2Echo](https://github.com/i2Echo) V2.0的推动者,可视化地图编辑器的制作者,游戏界面自适应匹配的编写者。和zhaouv一起推动和开发了V2.0的制作。 [@wadxm](https://github.com/wadxm) iOS平台的APP(因为苹果政策无法上架)和启动服务mac版的开发者。我们现在能在mac上制作魔塔得归功于他。 diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 5eb06c2f..50b7d32a 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -293,6 +293,15 @@ table.col td { border-left-width: 0.117307vw; border-right-width: 0.117307vw; } +#mapColMark tr > td:nth-child(10){ + width: 6.86vw; +} +#mapColMark tr > td:nth-child(12){ + width: 6.86vw; +} +#mapColMark tr > td:nth-child(13){ + width: 6.56vw; +} #mapColMark td:hover .colBlock { position: absolute; @@ -338,6 +347,15 @@ table.row td { border-top-width: 0.117307vw; border-bottom-width: 0.117397vw; } +#mapRowMark tbody > tr:nth-child(2n) td { + height: 7.25vw; +} +#mapRowMark tbody > tr:nth-child(5) td { + height: 7.25vw; +} +#mapRowMark tbody > tr:nth-child(11) td { + height: 7.25vw; +} #mapRowMark td:hover .rowBlock { position: absolute; diff --git a/editor-mobile.html b/editor-mobile.html index 21c1a885..bae5db44 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -403,14 +403,14 @@ (function () { var colNum = ' '; for (var i = 0; i < 13; i++) { - var tpl = '' + (' '+i).slice(-2).replace(' ',' ') + '
'; + var tpl = '' + (' '+i).slice(-2).replace(' ',' ') + '
'; colNum += tpl; } arrColMark.innerHTML = '' + colNum + ''; mapColMark.innerHTML = '' + colNum + ''; var rowNum = ' '; for (var i = 0; i < 13; i++) { - var tpl = '' + (' '+i).slice(-2).replace(' ',' ') + '
'; + var tpl = '' + (' '+i).slice(-2).replace(' ',' ') + '
'; rowNum += tpl; } arrRowMark.innerHTML = rowNum; From c67c3e6e8d074b5d0f15945cd95d36005261f648 Mon Sep 17 00:00:00 2001 From: YouWei Zhao Date: Sat, 28 Jul 2018 20:27:00 +0800 Subject: [PATCH 2/2] ColMark,RowMark: table->div --- _server/css/editor_mobile.css | 56 +++++++++++++++++------------------ editor-mobile.html | 20 +++++++++++-- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 50b7d32a..d5eed943 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -247,20 +247,21 @@ body { line-height: 1.2em; } -td { +td, .coltd, .rowtd { border: 0.230vw solid #fff; color: #fff; cursor: crosshair; } -table.col { +table.col, div.col { position: relative; text-align: center; border-collapse: collapse; } -table.col td { +table.col td, +div.col .coltd { background-color: #4DB6AC; } @@ -277,6 +278,7 @@ table.col td { } #mapColMark { + position: absolute; top: 0; left: 4vw; width: 96vw; @@ -285,41 +287,40 @@ table.col td { } -#mapColMark td { +#mapColMark .coltd, +#mapColMark .coltd .coltext { + position: absolute; width: 7.15vw; + height: 4vw; + line-height: 4vw; padding: 0; border-bottom-width: 0px; border-top-width: 0px; border-left-width: 0.117307vw; border-right-width: 0.117307vw; } -#mapColMark tr > td:nth-child(10){ - width: 6.86vw; -} -#mapColMark tr > td:nth-child(12){ - width: 6.86vw; -} -#mapColMark tr > td:nth-child(13){ - width: 6.56vw; -} -#mapColMark td:hover .colBlock { +#mapColMark .coltd:hover .colBlock { position: absolute; top: 4vw; + left:0; height: 96vw; width: 7.384615vw; z-index: 100; background-color: rgba(38, 166, 154, .5); } -table.row { +table.row,div.row, +table.row,div.row .rowtext { + width:4vw; position: relative; text-align: right; vertical-align: middle; border-collapse: collapse; } -table.row td { +table.row td, +div.row .rowtd .rowtext{ background-color: #4C221B; } @@ -332,34 +333,33 @@ table.row td { } #mapRowMark { - top: 0; + position: absolute; + top: 4vw; left: 0; width: 4vw; height: 96vw; font-size: 3vw; } -#mapRowMark td { +#mapRowMark .rowtd{ + position: absolute; +} + +#mapRowMark .rowtd, +#mapRowMark .rowtd .rowtext{ height: 7.15vw; + line-height: 7.15vw; padding: 0; border-left-width: 0px; border-right-width: 0px; border-top-width: 0.117307vw; border-bottom-width: 0.117397vw; } -#mapRowMark tbody > tr:nth-child(2n) td { - height: 7.25vw; -} -#mapRowMark tbody > tr:nth-child(5) td { - height: 7.25vw; -} -#mapRowMark tbody > tr:nth-child(11) td { - height: 7.25vw; -} -#mapRowMark td:hover .rowBlock { +#mapRowMark .rowtd:hover .rowBlock { position: absolute; left: 4vw; + top: 0; height: 7.384615vw; width: 96vw; z-index: 100; diff --git a/editor-mobile.html b/editor-mobile.html index bae5db44..eae04732 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -201,8 +201,8 @@
-
-
+
+
@@ -407,13 +407,27 @@ colNum += tpl; } arrColMark.innerHTML = '' + colNum + ''; - mapColMark.innerHTML = '' + colNum + ''; + //mapColMark.innerHTML = '' + colNum + ''; var rowNum = ' '; for (var i = 0; i < 13; i++) { var tpl = '' + (' '+i).slice(-2).replace(' ',' ') + '
'; rowNum += tpl; } arrRowMark.innerHTML = rowNum; + //mapRowMark.innerHTML = rowNum; + })(); + (function () { + var colNum = ' '; + for (var i = 0; i < 13; i++) { + var tpl = '
' + (' '+i).slice(-2).replace(' ',' ') + '
'; + colNum += tpl; + } + mapColMark.innerHTML = '
' + colNum + '
'; + var rowNum = ' '; + for (var i = 0; i < 13; i++) { + var tpl = '
' + (' '+i).slice(-2).replace(' ',' ') + '
'; + rowNum += tpl; + } mapRowMark.innerHTML = rowNum; })();