Skip to content

Commit

Permalink
Replace d3.event.transform as no longer supported under d3 v7
Browse files Browse the repository at this point in the history
  • Loading branch information
codemacabre committed Sep 26, 2024
1 parent ee2c1e9 commit 850ba77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/renderD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ export const injectSVGElements = (imagesPath, inner, g) => {

export const setZoomTransform = (inner, svg) => {
// Set up zoom support
const zoom = d3.zoom().on('zoom', () => {
inner.attr('transform', d3.event.transform);
const zoom = d3.zoom().on('zoom', (zoomEvent) => {
inner.attr('transform', zoomEvent.transform);
});
svg.call(zoom);

Expand Down

0 comments on commit 850ba77

Please sign in to comment.