Skip to content

Commit

Permalink
feat: Re-export zoom.scaleExtent and add translateExtent and add sour…
Browse files Browse the repository at this point in the history
…ce event to zoom dispatcher

* Re-export zoom.scaleExtent

* add translateExtent and add source event to zoom dispatcher

---------

Co-authored-by: Lincoln Bergeson <[email protected]>
  • Loading branch information
tradingcage and lincolnbergeson authored Dec 22, 2023
1 parent 404d3ed commit 87d2372
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/d3fc-zoom/src/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const symbol = Symbol('d3fc-domain-zoom');
export default () => {
const dispatcher = dispatch('zoom');

const zoomer = zoom().on('zoom', function({ transform }) {
const zoomer = zoom().on('zoom', function (e) {
const { transform } = e;
const node = this;
let updatedTransform = transform;
let {
Expand Down Expand Up @@ -68,7 +69,7 @@ export default () => {
if (updatedTransform !== transform) {
zoomer.transform(select(node), updatedTransform);
}
dispatcher.call('zoom');
dispatcher.call('zoom', this, e);
});

const instance = (selection, xScale = null, yScale = null) => {
Expand Down Expand Up @@ -115,7 +116,9 @@ export default () => {
'clickDistance',
'tapDistance',
'duration',
'interpolate'
'interpolate',
'scaleExtent',
'translateExtent'
);

return instance;
Expand Down

0 comments on commit 87d2372

Please sign in to comment.