diff --git a/src/app/pages/home/home-page.component.ts b/src/app/pages/home/home-page.component.ts index 6bf118c..5ad1111 100644 --- a/src/app/pages/home/home-page.component.ts +++ b/src/app/pages/home/home-page.component.ts @@ -199,10 +199,12 @@ export class HomePageComponent implements OnInit, OnDestroy { const svg = d3.select(this.discoveryTargetRef.nativeElement); - this.zoomBehavior = d3.zoom().on('zoom', () => { - const transform = d3.event.transform; - svg.select('g').attr('transform', 'translate(' + transform.x + ',' + transform.y + ') scale(' + transform.k + ')'); - }); + this.zoomBehavior = d3.zoom() + .scaleExtent([0.5, 4]) + .on('zoom', () => { + const transform = d3.event.transform; + svg.select('g').attr('transform', 'translate(' + transform.x + ',' + transform.y + ') scale(' + transform.k + ')'); + }); svg.call(this.zoomBehavior); const __this = this;