2
0

fix(canvasDirective): tidying up and removing unneccessary code

This commit is contained in:
2018-05-19 20:52:55 +02:00
parent cef5274b85
commit 6c09fb512d
2 changed files with 22 additions and 47 deletions

View File

@@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core';
// import { FormsModule } from '@angular/forms';
import { Param } from './models/param.model';
import { Config } from './models/config.model';
@@ -26,29 +25,12 @@ export class AppComponent {
y: 0.4
},
stroke: {
width: 2
width: 0.2
},
spread: 80,
showGrid: true
showGrid: false
};
/**
* A test of canvasParam.margin change and binding to canvas.directive
*/
let x = 1;
let intrvlId = setInterval(() => {
if (x < 5) {
this.canvasParam.margin.x += 0.2;
x += 1;
console.log("canvas param ", this.canvasParam.margin.x);
} else {
clearInterval(intrvlId);
}
}, 1000);
/**
*
*/
};
}
public updateCanvasConfig(config): void {
this.canvasConfig = config;