Skip to content

Commit f8141b2

Browse files
committed
Fix d3 zoom
1 parent 534c321 commit f8141b2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "treeviz",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "Library which aims to represent trees for data visualization",
55
"keywords": [
66
"d3",

src/initializeSVG.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import d3 from "./d3";
1+
// Got to import d3 two times because of an issue with Webpack/Babel with d3.event
2+
import * as d3 from "d3-selection";
3+
import customD3 from "./d3";
24
import { ITreeConfig } from "./typings";
35
import { getAreaSize } from "./utils";
46

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

28-
const zoom = d3
30+
const zoom = customD3
2931
.zoom()
3032
.scaleExtent([0.2, 20])
3133
.on("zoom", () => {

0 commit comments

Comments
 (0)