zoom fixed 0.5x ~ 4x
This commit is contained in:
parent
46349fb178
commit
485dc7e8c1
|
@ -199,7 +199,9 @@ export class HomePageComponent implements OnInit, OnDestroy {
|
|||
|
||||
const svg = d3.select(this.discoveryTargetRef.nativeElement);
|
||||
|
||||
this.zoomBehavior = d3.zoom().on('zoom', () => {
|
||||
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 + ')');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user