clearPaint
This commit is contained in:
parent
3ce1c2e468
commit
9bc235255c
@ -2597,6 +2597,12 @@ actions.prototype.setPaintMode = function (mode) {
|
|||||||
core.drawTip("进入"+(core.status.event.data.erase?"擦除":"绘图")+"模式");
|
core.drawTip("进入"+(core.status.event.data.erase?"擦除":"绘图")+"模式");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actions.prototype.clearPaint = function () {
|
||||||
|
core.clearMap('route');
|
||||||
|
core.paint[core.status.floorId] = null;
|
||||||
|
core.drawTip("已清空绘图内容");
|
||||||
|
}
|
||||||
|
|
||||||
actions.prototype.savePaint = function () {
|
actions.prototype.savePaint = function () {
|
||||||
var data = {};
|
var data = {};
|
||||||
for (var floorId in core.paint) {
|
for (var floorId in core.paint) {
|
||||||
@ -2639,7 +2645,6 @@ actions.prototype.exitPaint = function () {
|
|||||||
core.clearMap('route');
|
core.clearMap('route');
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.statusBar.image.shop.style.opacity = 1;
|
core.statusBar.image.shop.style.opacity = 1;
|
||||||
core.statusBar.image.toolbox.style.opacity = 1;
|
|
||||||
core.updateStatusBar();
|
core.updateStatusBar();
|
||||||
core.drawTip("退出绘图模式");
|
core.drawTip("退出绘图模式");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2460,10 +2460,10 @@ ui.prototype.drawPaint = function () {
|
|||||||
core.setStrokeStyle('route', '#FF0000');
|
core.setStrokeStyle('route', '#FF0000');
|
||||||
|
|
||||||
core.statusBar.image.shop.style.opacity = 0;
|
core.statusBar.image.shop.style.opacity = 0;
|
||||||
core.statusBar.image.toolbox.style.opacity = 0;
|
|
||||||
|
|
||||||
core.statusBar.image.book.src = core.statusBar.icons.paint.src;
|
core.statusBar.image.book.src = core.statusBar.icons.paint.src;
|
||||||
core.statusBar.image.fly.src = core.statusBar.icons.erase.src;
|
core.statusBar.image.fly.src = core.statusBar.icons.erase.src;
|
||||||
|
core.statusBar.image.toolbox.src = core.statusBar.icons.delete.src;
|
||||||
core.statusBar.image.settings.src = core.statusBar.icons.exit.src;
|
core.statusBar.image.settings.src = core.statusBar.icons.exit.src;
|
||||||
core.statusBar.image.book.style.opacity = 1;
|
core.statusBar.image.book.style.opacity = 1;
|
||||||
core.statusBar.image.fly.style.opacity = 1;
|
core.statusBar.image.fly.style.opacity = 1;
|
||||||
|
|||||||
8
main.js
8
main.js
@ -130,7 +130,8 @@ function main() {
|
|||||||
'skill': 25,
|
'skill': 25,
|
||||||
'paint': 26,
|
'paint': 26,
|
||||||
'erase': 27,
|
'erase': 27,
|
||||||
'exit': 28,
|
'delete': 28,
|
||||||
|
'exit': 29,
|
||||||
},
|
},
|
||||||
'floor': document.getElementById('floor'),
|
'floor': document.getElementById('floor'),
|
||||||
'name': document.getElementById('name'),
|
'name': document.getElementById('name'),
|
||||||
@ -451,6 +452,11 @@ main.statusBar.image.toolbox.onclick = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (main.core.isPlaying() && (core.status.event||{}).id=='paint') {
|
||||||
|
core.actions.clearPaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (main.core.isPlaying()) {
|
if (main.core.isPlaying()) {
|
||||||
main.core.openToolbox(core.status.event.id != 'equipbox');
|
main.core.openToolbox(core.status.event.id != 'equipbox');
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
project/images/delete (1).png
Normal file
BIN
project/images/delete (1).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 940 B |
BIN
project/images/delete.png
Normal file
BIN
project/images/delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 962 B |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Loading…
Reference in New Issue
Block a user