Skip to content

Commit

Permalink
Stop modifying options in interaction handlers (#9939)
Browse files Browse the repository at this point in the history
* Stop modifying options in interaction handlers
* Don't use object spread
  • Loading branch information
kurkle committed Dec 1, 2021
1 parent db995af commit 6552a01
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/core.interaction.js
Expand Up @@ -322,8 +322,7 @@ export default {
* @return {InteractionItem[]} - items that are found
*/
x(chart, e, options, useFinalPosition) {
options.axis = 'x';
return getAxisItems(chart, e, options, useFinalPosition);
return getAxisItems(chart, e, {axis: 'x', intersect: options.intersect}, useFinalPosition);
},

/**
Expand All @@ -336,8 +335,7 @@ export default {
* @return {InteractionItem[]} - items that are found
*/
y(chart, e, options, useFinalPosition) {
options.axis = 'y';
return getAxisItems(chart, e, options, useFinalPosition);
return getAxisItems(chart, e, {axis: 'y', intersect: options.intersect}, useFinalPosition);
}
}
};

0 comments on commit 6552a01

Please sign in to comment.