Skip to content
Snippets Groups Projects
Commit 8be3f7e8 authored by Nicolas Camera's avatar Nicolas Camera
Browse files

Se agrega nueva configuración para el graficador3D

Se agregan opciones para aristas, meta data y vertices.
parent a6f34de7
No related branches found
No related tags found
1 merge request!4Se agrega nueva configuración para el graficador3D
......@@ -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 }}:
......
......@@ -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);
......
......@@ -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,
......
......@@ -50,6 +50,9 @@
"axis": "axis",
"axes": "axes",
"grid": "grid",
"metaData": "other information",
"edges": "edges",
"vertices": "vertices",
"tip": "tip",
"normal": "normal",
"quality": "quality",
......
......@@ -50,6 +50,9 @@
"axis": "eje",
"axes": "ejes",
"grid": "grilla",
"metaData": "otra información",
"edges": "aristas",
"vertices": "vertices",
"tip": "tip",
"normal": "normal",
"quality": "calidad",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment