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

Fixed multiple lasso bug #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed multiple lasso bug #125

wants to merge 1 commit into from

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