Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

brush().touchable not a function #63

Closed
japrescott opened this issue Nov 20, 2019 · 2 comments
Closed

brush().touchable not a function #63

japrescott opened this issue Nov 20, 2019 · 2 comments

Comments

@japrescott
Copy link

I am trying to override the touch detector to disable the brush on touch enabled devices.
when setting up the brush, I get an error that touchable is not a function

			brush = d3.brushX()
				.touchable(()=>{ // <-- throws error
					return false;
				})
				.filter(()=>{
					return !d3.event.shiftKey;
				})
				.extent([[0, 0], [width, height]])
				.on("start", () => {
					console.log('brush started');
				})

looking at the sourcecode doesn't seem to correlate with the information provided in the Readme. Is this a relic of the past or will this be exposed in the future?

@mbostock
Copy link
Member

It looks like the touchable logic was implemented internally, but the brush.touchable accessor wasn’t exposed as intended. brush.touchable was intended to be added in d3-brush 1.1.0 (d3 5.10.0).

@mbostock
Copy link
Member

Fixed in 1.1.5.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

2 participants