Hide Implementation of edge rendering in grid
This commit is contained in:
parent
7c49531d0e
commit
9030d31e97
3 changed files with 6 additions and 1 deletions
|
@ -54,7 +54,7 @@ class AppComponent implements OnInit {
|
|||
}
|
||||
|
||||
void onEdgesClicked() {
|
||||
engine.grid.switchEdgeRendering();
|
||||
engine.toggleEdgeRendering();
|
||||
}
|
||||
|
||||
void onClearClicked() {
|
||||
|
|
|
@ -65,6 +65,8 @@ class Engine {
|
|||
void render([num interp]) {
|
||||
// print("rendering");
|
||||
grid.render(canvas, interp);
|
||||
void toggleEdgeRendering() {
|
||||
_grid.renderEdges = !_grid.renderEdges;
|
||||
}
|
||||
|
||||
void set running(bool on) => _running = on;
|
||||
|
|
|
@ -210,6 +210,9 @@ class Grid {
|
|||
|
||||
void switchEdgeRendering([bool on]) {
|
||||
_renderEdges = on ?? !_renderEdges;
|
||||
void set renderEdges(bool on) {
|
||||
_renderEdges = on;
|
||||
_dirty = true;
|
||||
}
|
||||
bool get renderEdges => _renderEdges;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue