Skip to content

Commit 2d13b7c

Browse files
committed
relax pointerX and pointerY
1 parent 96b8fde commit 2d13b7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/marks/pointer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ export function pointer(data, {x, y, ...options} = {}) {
137137
return new Pointer(data, {...options, x, y});
138138
}
139139

140-
export function pointerX(data, {x = identity, ...options} = {}) {
141-
return new Pointer(data, {...options, mode: "x", x, y: null});
140+
export function pointerX(data, {mode = "x", x = identity, ...options} = {}) {
141+
return new Pointer(data, {...options, mode, x});
142142
}
143143

144-
export function pointerY(data, {y = identity, ...options} = {}) {
145-
return new Pointer(data, {...options, mode: "y", x: null, y});
144+
export function pointerY(data, {mode = "y", y = identity, ...options} = {}) {
145+
return new Pointer(data, {...options, mode, y});
146146
}

0 commit comments

Comments
 (0)