Skip to content

Commit

Permalink
fix errors in the graph (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellthompson authored Nov 19, 2021
1 parent 5a455af commit 78751bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/joint-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import './lib/joint.scss';
import './lib/layout.scss';
import './lib/material.scss';
import 'jquery';
import 'lodash';
import _ from 'lodash';
import 'backbone';
import * as joint from 'jointjs/dist/joint.min';
// TODO replace with a lighter math library
Expand Down Expand Up @@ -95,7 +95,7 @@ class JointGraph {
});

const graphResizeObserver = new ResizeObserver((_) => {
this._resizeGraph();
this._resizeGraph(dom);
});
graphResizeObserver.observe(dom);

Expand Down Expand Up @@ -147,8 +147,8 @@ class JointGraph {

}

_resizeGraph() {
this._paper.setDimensions(this._dom.offsetWidth, this._dom.offsetHeight);
_resizeGraph(dom) {
this._paper.setDimensions(dom.offsetWidth, dom.offsetHeight);
}

_scaleToPoint(nextScale, x, y) {
Expand Down

0 comments on commit 78751bb

Please sign in to comment.