Skip to content

Commit

Permalink
Fix d3 zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreCapo committed Apr 9, 2019
1 parent 534c321 commit f8141b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "treeviz",
"version": "1.3.2",
"version": "1.3.3",
"description": "Library which aims to represent trees for data visualization",
"keywords": [
"d3",
Expand Down
6 changes: 4 additions & 2 deletions src/initializeSVG.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import d3 from "./d3";
// Got to import d3 two times because of an issue with Webpack/Babel with d3.event
import * as d3 from "d3-selection";
import customD3 from "./d3";
import { ITreeConfig } from "./typings";
import { getAreaSize } from "./utils";

Expand All @@ -25,7 +27,7 @@ export const initiliazeSVG = (treeConfig: ITreeConfig) => {
const width = areaWidth - margin.left - margin.right;
const height = areaHeight - margin.top - margin.bottom;

const zoom = d3
const zoom = customD3
.zoom()
.scaleExtent([0.2, 20])
.on("zoom", () => {
Expand Down

0 comments on commit f8141b2

Please sign in to comment.