Commit ff4b8566 authored by Diego Rey's avatar Diego Rey
Browse files

Added zoom and multigraf controls on settings popover

parent 90200d00
...@@ -4139,8 +4139,8 @@ ...@@ -4139,8 +4139,8 @@
"dev": true "dev": true
}, },
"function-plot": { "function-plot": {
"version": "git://github.com/diego-rey/function-plot.git#925138ee94815e91f48c82b1dca9d55901aeb20e", "version": "git://github.com/diego-rey/function-plot.git#81713c85f1fb90ff0f41a3dade1bcd831e80b6fa",
"from": "git://github.com/diego-rey/function-plot.git#feature/mutigraf", "from": "git://github.com/diego-rey/function-plot.git#feature/integration-multigraf-shape",
"requires": { "requires": {
"array-range": "^1.0.1", "array-range": "^1.0.1",
"built-in-math-eval": "^0.3.0", "built-in-math-eval": "^0.3.0",
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
"core-js": "^2.4.1", "core-js": "^2.4.1",
"d3": "^4.12.2", "d3": "^4.12.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"function-plot": "git://github.com/diego-rey/function-plot.git#feature/mutigraf", "function-plot": "git://github.com/diego-rey/function-plot.git#feature/integration-multigraf-shape",
"graph3D": "git://github.com/ifagian/graph3D#master", "graph3D": "git://github.com/ifagian/graph3D#master",
"ionicons": "^3.0.0", "ionicons": "^3.0.0",
"jq-console": "^2.13.2", "jq-console": "^2.13.2",
......
...@@ -86,6 +86,31 @@ ...@@ -86,6 +86,31 @@
Tip Tip
</label> </label>
</div> </div>
<hr>
<div class="setting-section">
<label>
<input
type="checkbox"
[checked]=animation.boton
(click)="multiGraf(value)">
Multi gráfica
</label>
<div style="display: flex;">
<span style="margin-right: 8px; align-self: center;">
Zoom
</span>
<input
type="number"
class="form-control form-control-sm"
[(ngModel)]="animation.zoo"
[max]="1000000"
[min]="8"
(change)="setZoom()"
style="width: 70px;"
/>
</div>
</div>
<hr>
<div class="animation-controls setting-section" <div class="animation-controls setting-section"
[class.disabled]="animation.data.length === 0"> [class.disabled]="animation.data.length === 0">
<label>Velocidad de animación:</label> <label>Velocidad de animación:</label>
...@@ -114,8 +139,7 @@ ...@@ -114,8 +139,7 @@
</ng-template> </ng-template>
<!-- Animation --> <!-- Animation -->
<!-- <div class="animation" *ngIf="animation.data.length>0"> --> <div class="animation" *ngIf="animation.data.length>0">
<div class="animation">
<button class="btn btn-sm btn-secondary btn-play" <button class="btn btn-sm btn-secondary btn-play"
data-placement="bottom" data-placement="bottom"
*ngIf="!animation.playing" *ngIf="!animation.playing"
......
...@@ -162,6 +162,7 @@ export class Graph2DComponent { ...@@ -162,6 +162,7 @@ export class Graph2DComponent {
}); });
} }
let bounding = this.getBounding(); let bounding = this.getBounding();
console.log(bounding);
this.instance = functionPlot({ this.instance = functionPlot({
target: '#graph2D-container', target: '#graph2D-container',
width: bounding.width, width: bounding.width,
...@@ -265,12 +266,11 @@ export class Graph2DComponent { ...@@ -265,12 +266,11 @@ export class Graph2DComponent {
onResize(event){ onResize(event){
let instance = this.instance; let instance = this.instance;
let bounding = this.getBounding(); let bounding = this.getBounding();
//if (bounding.width > 0) { if (bounding.width > 0) {
console.log('yes');
instance.options.width = bounding.width; instance.options.width = bounding.width;
instance.options.height = bounding.height; instance.options.height = bounding.height;
instance.build(); instance.build();
//} }
} }
onClickMe(event) { onClickMe(event) {
...@@ -368,7 +368,7 @@ export class Graph2DComponent { ...@@ -368,7 +368,7 @@ export class Graph2DComponent {
* @desc Show and Hide Grid * @desc Show and Hide Grid
*/ */
public toggleGrid = function () { public toggleGrid = function () {
//this.instance.toggleGrid(); this.instance.toggleGrid();
} }
/** /**
...@@ -376,7 +376,7 @@ export class Graph2DComponent { ...@@ -376,7 +376,7 @@ export class Graph2DComponent {
* @desc Show and Hide Axis * @desc Show and Hide Axis
*/ */
public toggleAxis = function () { public toggleAxis = function () {
//this.instance.toggleAxis(); this.instance.toggleAxis();
} }
/** /**
...@@ -384,7 +384,7 @@ export class Graph2DComponent { ...@@ -384,7 +384,7 @@ export class Graph2DComponent {
* @desc Show and Hide Tip * @desc Show and Hide Tip
*/ */
public toggleTip = function () { public toggleTip = function () {
//this.instance.toggleTip(); this.instance.toggleTip();
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment