Hide Implementation of edge rendering in grid

This commit is contained in:
Marty Oehme 2018-07-09 17:27:11 +02:00
parent 7c49531d0e
commit 9030d31e97
3 changed files with 6 additions and 1 deletions

View file

@ -54,7 +54,7 @@ class AppComponent implements OnInit {
}
void onEdgesClicked() {
engine.grid.switchEdgeRendering();
engine.toggleEdgeRendering();
}
void onClearClicked() {

View file

@ -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;

View file

@ -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;
}