From 8be3f7e8e0235d889e6907d44d90559ca2c8d488 Mon Sep 17 00:00:00 2001 From: Nicolas Camera <nico_camera98@hotmail.com> Date: Mon, 10 Apr 2023 22:58:32 -0300 Subject: [PATCH] =?UTF-8?q?Se=20agrega=20nueva=20configuraci=C3=B3n=20para?= =?UTF-8?q?=20el=20graficador3D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se agregan opciones para aristas, meta data y vertices. --- .../plotter/graph3D/graph3D.component.html | 27 +++++++++++++++++++ .../plotter/graph3D/graph3D.component.ts | 15 +++++++++++ .../layout/plotter/graph3D/graph3D.helper.ts | 6 +++++ Frontend Angular 4/src/assets/i18n/en.json | 3 +++ Frontend Angular 4/src/assets/i18n/es.json | 3 +++ 5 files changed, 54 insertions(+) diff --git a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.html b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.html index f1ca970..44f87ce 100755 --- a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.html +++ b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.html @@ -167,6 +167,15 @@ <ng-template #popoverConfig> <div style="width: 140px"> + <label class="d-block"> + <input + type="checkbox" + [checked]="graphProps.showEdges" + (click)="changeEdgesVisibility()" + /> + {{ "i18n.object.edges" | translate | titleCase }} + </label> + <label class="d-block"> <input type="checkbox" @@ -176,6 +185,24 @@ {{ "i18n.object.grid" | translate | titleCase }} </label> + <label class="d-block"> + <input + type="checkbox" + [checked]="graphProps.showMetaData" + (click)="changeMetaDataVisibility()" + /> + {{ "i18n.object.metaData" | translate | titleCase }} + </label> + + <label class="d-block"> + <input + type="checkbox" + [checked]="graphProps.showVertices" + (click)="changeVerticesVisibility()" + /> + {{ "i18n.object.vertices" | translate | titleCase }} + </label> + <div style="display: flex"> <span style="margin-right: 8px; align-self: center"> {{ "i18n.object.quality" | translate | titleCase }}: diff --git a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts index d917265..9596512 100755 --- a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts @@ -154,11 +154,26 @@ export class Graph3DComponent implements AfterViewInit { graph3DLib.changeZoomType(this.graphProps.zoomType); }; + public changeEdgesVisibility = () => { + this.graphProps.showEdges = !this.graphProps.showEdges; + graph3DLib.showEdges(this.graphProps.showEdges); + }; + public changeAxesVisibility = () => { this.graphProps.showAxes = !this.graphProps.showAxes; graph3DLib.showAxes(this.graphProps.showAxes); }; + public changeVerticesVisibility = () => { + this.graphProps.showVertices = !this.graphProps.showVertices; + graph3DLib.showVertices(this.graphProps.showVertices); + }; + + public changeMetaDataVisibility = () => { + this.graphProps.showMetaData = !this.graphProps.showMetaData; + graph3DLib.showMetaData(this.graphProps.showMetaData); + }; + handleAxesRangeDebounced = debounce(function () { setTimeout(() => graph3DLib.changeAxesSize(this.graphProps.range)); }, 500); diff --git a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.helper.ts b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.helper.ts index 662e9c4..52c4e6b 100755 --- a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.helper.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.helper.ts @@ -29,6 +29,9 @@ export enum Zoom3DType { export interface GraphProps { zoomType?: Zoom3DType; showAxes?: boolean; + showEdges?: boolean; + showMetaData?: boolean; + showVertices?: boolean; quality?: number; range: { xMin?: number; @@ -43,6 +46,9 @@ export interface GraphProps { export const Default_GraphProps: GraphProps = { zoomType: Zoom3DType.Normal, showAxes: true, + showEdges: false, + showMetaData: false, + showVertices: false, quality: 30, range: { xMin: -10, diff --git a/Frontend Angular 4/src/assets/i18n/en.json b/Frontend Angular 4/src/assets/i18n/en.json index 56fbc95..e64e271 100755 --- a/Frontend Angular 4/src/assets/i18n/en.json +++ b/Frontend Angular 4/src/assets/i18n/en.json @@ -50,6 +50,9 @@ "axis": "axis", "axes": "axes", "grid": "grid", + "metaData": "other information", + "edges": "edges", + "vertices": "vertices", "tip": "tip", "normal": "normal", "quality": "quality", diff --git a/Frontend Angular 4/src/assets/i18n/es.json b/Frontend Angular 4/src/assets/i18n/es.json index 13ab990..ba2c8ac 100755 --- a/Frontend Angular 4/src/assets/i18n/es.json +++ b/Frontend Angular 4/src/assets/i18n/es.json @@ -50,6 +50,9 @@ "axis": "eje", "axes": "ejes", "grid": "grilla", + "metaData": "otra información", + "edges": "aristas", + "vertices": "vertices", "tip": "tip", "normal": "normal", "quality": "calidad", -- GitLab