2
0

reduced dependency payload

This commit is contained in:
2018-05-10 22:41:03 +02:00
parent 8b01fc6872
commit 3379fa8c92

View File

@@ -1,7 +1,7 @@
import { Point } from './../models/point.model'; import { Point } from './../models/point.model';
import { Directive, ElementRef, Renderer, AfterViewInit, HostListener, Output, EventEmitter, OnInit } from '@angular/core'; import { Directive, ElementRef, Renderer, AfterViewInit, HostListener, Output, EventEmitter, OnInit } from '@angular/core';
import { Config } from './../models/config.model'; import { Config } from './../models/config.model';
import * as d3 from 'd3'; import { select } from 'd3-selection';
@Directive({ @Directive({
selector: '[appCanvas]' selector: '[appCanvas]'
@@ -38,7 +38,7 @@ export class CanvasDirective implements OnInit {
} }
private initSvg() { private initSvg() {
this.svg = d3.select(this.canvas).append('svg') this.svg = select(this.canvas).append('svg')
.attr('width', this.config.width) .attr('width', this.config.width)
.attr('height', this.config.height); .attr('height', this.config.height);
} }