2
0

removed console logs

This commit is contained in:
2018-08-05 18:38:53 +02:00
parent e220f6b5dd
commit b4e915d1ea
2 changed files with 7 additions and 17 deletions

View File

@@ -14,7 +14,7 @@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
import { ViewChildren, QueryList, Component, AfterViewInit, ViewChild, Input, SimpleChanges, OnChanges, HostListener } from '@angular/core'; import { ViewChildren, QueryList, Component, ViewChild, Input, SimpleChanges, OnChanges, HostListener } from '@angular/core';
import * as Selection from 'd3-selection'; import * as Selection from 'd3-selection';
import * as Shape from 'd3-shape'; import * as Shape from 'd3-shape';
import * as Random from 'd3-random'; import * as Random from 'd3-random';
@@ -31,7 +31,7 @@ import { Point } from '../models/point.model';
templateUrl: './graphs.component.html', templateUrl: './graphs.component.html',
styleUrls: ['./graphs.component.scss'] styleUrls: ['./graphs.component.scss']
}) })
export class GraphsComponent implements AfterViewInit, OnChanges { export class GraphsComponent implements OnChanges {
public graphs: Graph[]; public graphs: Graph[];
public canvas: any | null; public canvas: any | null;
@@ -56,17 +56,9 @@ export class GraphsComponent implements AfterViewInit, OnChanges {
} }
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
console.log('graph component (changes:config)', changes.config.currentValue);
this.init(); this.init();
} }
/**
* @todo Will deprecate if there won't be any use for this
*/
ngAfterViewInit() {
console.log('graph component (afterView:children)', this.guillocheViewChildren.toArray());
}
private init() { private init() {
this.updateCanvas(); this.updateCanvas();
this.updateMatrix(); this.updateMatrix();
@@ -91,7 +83,6 @@ export class GraphsComponent implements AfterViewInit, OnChanges {
]; ];
this.graphs = curveList.map(curve => this.adjustGraph(curve)); this.graphs = curveList.map(curve => this.adjustGraph(curve));
console.log('graphs component (updateGraphs):', this.graphs);
} }
private adjustGraph(curve) { private adjustGraph(curve) {

View File

@@ -48,11 +48,12 @@ export class GuillocheDirective implements OnChanges {
} }
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
const points = [this.graph.start.point, ...this.graph.nodes, this.graph.end.point]; const points = [
this.graph.start.point,
...this.graph.nodes,
this.graph.end.point
];
this.spreadLines(points); this.spreadLines(points);
console.log('guilloche directive (changes)', changes.graph.currentValue);
} }
private drawGraph(points: Point[]): void { private drawGraph(points: Point[]): void {
@@ -68,8 +69,6 @@ export class GuillocheDirective implements OnChanges {
if (!env.production) { if (!env.production) {
this.showGrid(); this.showGrid();
} }
console.log('guilloche directive(drawGraph)', this.graph);
} }
private spreadLines(points: Point[]) { private spreadLines(points: Point[]) {