Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Conversation

skokenes
Copy link

A d3.select("path") is called to select the path drawn in order to get the path definition and create a closed path from it. This does not work if multiple lassos are drawn on the page, since the d3.select("path") will only select the first path. Instead of using d3.select() to find this value, it is actually already stored previously in a variable called "path". So the closed path can be created by just using
path + "Z";

Instead of d3.select(path). This version allows you to use multiple lasso's on one page.

A d3.select("path") is called to select the path drawn in order to get the path definition and create a closed path from it. This does not work if multiple lassos are drawn on the page, since the d3.select("path") will only select the first path. Instead of using d3.select() to find this value, it is actually already stored previously in a variable called "path". So the closed path can be created by just using 
path + "Z";

Instead of d3.select(path). This version allows you to use multiple lasso's on one page.
@timelyportfolio
Copy link

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants