2
0

added form and update functions

This commit is contained in:
2018-05-23 12:30:28 +02:00
parent b18c196610
commit 1231b2de9c
8 changed files with 132 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
import { Graph } from './../models/graph.model';
import { ElementRef, HostListener, Output, EventEmitter, Input, Directive, OnInit } from '@angular/core';
import { ElementRef, HostListener, Output, EventEmitter, Input, Directive, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import * as Selection from 'd3-selection';
import * as Shape from 'd3-shape';
import * as Random from 'd3-random';
@@ -12,14 +12,14 @@ import { Param } from './../models/param.model';
@Directive({
selector: '[guilloche]'
})
export class GuillocheDirective implements OnInit {
export class GuillocheDirective implements OnChanges {
@Input() graph: Graph;
constructor() {
}
ngOnInit() {
console.log('guilloche directive', this.graph);
ngOnChanges(changes: SimpleChanges) {
console.log('guilloche directive (changes)', changes.graph);
}
}