Skip to content

Commit

Permalink
factor out interpolation function in tweening function
Browse files Browse the repository at this point in the history
  • Loading branch information
magjac committed Oct 13, 2024
1 parent 1311086 commit 6ed19df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ function _render(callback) {
return function (t) {
const fromTransform = zoomTransform(graphvizInstance._zoomSelection.node()).toString();
const toTransform = getTranslatedZoomTransform.call(graphvizInstance, element).toString();
node.setAttribute("transform", interpolateTransformSvg(fromTransform, toTransform)(t));
const interpolationFunction = interpolateTransformSvg(fromTransform, toTransform);
node.setAttribute("transform", interpolationFunction(t));
};
});
}
Expand Down

0 comments on commit 6ed19df

Please sign in to comment.