2
0

Bindings are made and param changes are communicating to canvas.directive.

This commit is contained in:
Erik Kimsey
2018-05-18 20:58:33 -04:00
parent b70c4f3e53
commit d1f22e0973
3 changed files with 34 additions and 12 deletions

View File

@@ -31,7 +31,24 @@ export class AppComponent {
spread: 80,
showGrid: true
};
}
/**
* 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;