From dd64b11fa14b19da31deb65a957d86ec9abad166 Mon Sep 17 00:00:00 2001
From: Diego Rey <diego.despaux@izundo.com>
Date: Thu, 20 Sep 2018 20:09:28 -0300
Subject: [PATCH] Fixed 2D settings controls

---
 .../layout/plotter/graph2D/graph2D.component.html    | 12 ++++++------
 .../app/layout/plotter/graph2D/graph2D.component.ts  |  3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.html b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.html
index 226ea4cc..aa0f7cfb 100755
--- a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.html	
+++ b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.html	
@@ -61,27 +61,27 @@
 					<label>
 						<input 	
 							type="checkbox" 
-							name="settings.grid"
+							name="grid"
 							class="form-control form-control-sm"
-							[checked]=settings.grid
+							[checked]= settings.grid
 							(click)="toggleGrid()">
 						Grilla
 					</label>
 					<label>
 						<input 	
 							type="checkbox"
-							name="settings.axis"
+							name="axis"
 							class="form-control form-control-sm"
-							[checked]=settings.axis 
+							[checked]= settings.axis 
 							(click)="toggleAxis()">
 						Ejes
 					</label>
 					<label>
 						<input 	
 							type="checkbox"
-							name="settings.tip"
+							name="tip"
 							class="form-control form-control-sm"
-							[checked]=settings.tip
+							[checked]= settings.tip
 							(click)="toggleTip()">
 						Tip
 					</label>
diff --git a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts
index 7282c897..4329cdce 100755
--- a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts	
+++ b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts	
@@ -393,6 +393,7 @@ export class Graph2DComponent {
      */
     public toggleGrid = function () {
         this.instance.toggleGrid();
+        this.settings.grid = !this.settings.grid;
     }
 
     /**
@@ -401,6 +402,7 @@ export class Graph2DComponent {
      */
     public toggleAxis = function () {
         this.instance.toggleAxis();
+        this.settings.axis = !this.settings.axis;
     }
 
     /**
@@ -409,6 +411,7 @@ export class Graph2DComponent {
      */
     public toggleTip = function () {
         this.instance.toggleTip();
+        this.settings.tip = !this.settings.tip;
     }
 
     /**
-- 
GitLab