|
@@ -98,15 +98,18 @@ export default class Render {
|
|
autoRedraw() {
|
|
autoRedraw() {
|
|
console.log("重绘");
|
|
console.log("重绘");
|
|
draw.clear();
|
|
draw.clear();
|
|
- const grid = dataService.getGrid();
|
|
|
|
- draw.drawGrid(
|
|
|
|
- grid.startX,
|
|
|
|
- grid.startY,
|
|
|
|
- coordinate.width,
|
|
|
|
- coordinate.height,
|
|
|
|
- grid.step1,
|
|
|
|
- grid.step2
|
|
|
|
- );
|
|
|
|
|
|
+ if (dataService.getGridDisplay()) {
|
|
|
|
+ const grid = dataService.getGrid();
|
|
|
|
+ draw.drawGrid(
|
|
|
|
+ grid.startX,
|
|
|
|
+ grid.startY,
|
|
|
|
+ coordinate.width,
|
|
|
|
+ coordinate.height,
|
|
|
|
+ grid.step1,
|
|
|
|
+ grid.step2
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
this.drawGeometry(dataService.getBackgroundImg());
|
|
this.drawGeometry(dataService.getBackgroundImg());
|
|
|
|
|
|
let roads = dataService.getRoads();
|
|
let roads = dataService.getRoads();
|