1
1
import { Helpers as CoreHelpers , Selection } from "victory-core" ;
2
- import { throttle , defaults , mapValues } from "lodash" ;
2
+ import { throttle , defaults } from "lodash" ;
3
3
import isEqual from "react-fast-compare" ;
4
4
5
5
const Helpers = {
@@ -12,8 +12,8 @@ const Helpers = {
12
12
} ,
13
13
14
14
withinBounds ( point , bounds , padding ?) {
15
- const { x1, x2, y1, y2 } = mapValues ( bounds , Number ) ;
16
- const { x, y } = mapValues ( point , Number ) ;
15
+ const { x1, x2, y1, y2 } = CoreHelpers . mapValues ( bounds , Number ) ;
16
+ const { x, y } = CoreHelpers . mapValues ( point , Number ) ;
17
17
const paddingValue = padding ? padding / 2 : 0 ;
18
18
return (
19
19
x + paddingValue >= Math . min ( x1 , x2 ) &&
@@ -190,7 +190,7 @@ const Helpers = {
190
190
} ,
191
191
192
192
constrainBox ( box , fullDomainBox ) {
193
- const { x1, y1, x2, y2 } = mapValues ( fullDomainBox , Number ) ;
193
+ const { x1, y1, x2, y2 } = CoreHelpers . mapValues ( fullDomainBox , Number ) ;
194
194
return {
195
195
x1 : box . x2 > x2 ? x2 - Math . abs ( box . x2 - box . x1 ) : Math . max ( box . x1 , x1 ) ,
196
196
y1 : box . y2 > y2 ? y2 - Math . abs ( box . y2 - box . y1 ) : Math . max ( box . y1 , y1 ) ,
@@ -200,7 +200,7 @@ const Helpers = {
200
200
} ,
201
201
202
202
constrainPoint ( point , fullDomainBox ) {
203
- const { x1, y1, x2, y2 } = mapValues ( fullDomainBox , Number ) ;
203
+ const { x1, y1, x2, y2 } = CoreHelpers . mapValues ( fullDomainBox , Number ) ;
204
204
return {
205
205
x : Math . min ( Math . max ( point . x , x1 ) , x2 ) ,
206
206
y : Math . min ( Math . max ( point . y , y1 ) , y2 ) ,
0 commit comments