Skip to content

Commit 78751bb

Browse files
authored
fix errors in the graph (#22)
1 parent 5a455af commit 78751bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/joint-graph.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import './lib/joint.scss';
22
import './lib/layout.scss';
33
import './lib/material.scss';
44
import 'jquery';
5-
import 'lodash';
5+
import _ from 'lodash';
66
import 'backbone';
77
import * as joint from 'jointjs/dist/joint.min';
88
// TODO replace with a lighter math library
@@ -95,7 +95,7 @@ class JointGraph {
9595
});
9696

9797
const graphResizeObserver = new ResizeObserver((_) => {
98-
this._resizeGraph();
98+
this._resizeGraph(dom);
9999
});
100100
graphResizeObserver.observe(dom);
101101

@@ -147,8 +147,8 @@ class JointGraph {
147147

148148
}
149149

150-
_resizeGraph() {
151-
this._paper.setDimensions(this._dom.offsetWidth, this._dom.offsetHeight);
150+
_resizeGraph(dom) {
151+
this._paper.setDimensions(dom.offsetWidth, dom.offsetHeight);
152152
}
153153

154154
_scaleToPoint(nextScale, x, y) {

0 commit comments

Comments
 (0)