0

I am using D3.Js and lasso in my Angular 6 project. I have initialized lasso with start(), draw() and stop() functions. But I don't know how to bind this lasso with my svg. In traditional JavaScript, they use following syntax.

svg.call(lasso_object);

How do I do this in Angular? Here is my code in Stackblitz

  • if you add a stackblitz with a minimal example which replicates your issues, you'll have a better chance of more hlep – Akber Iqbal Dec 06 '18 at 04:16
  • I have updated my code in stackblitz. Appreciate your help. – Madara Premawardhana Dec 06 '18 at 06:38
  • on stackblitz, error is "Cannot find module 'd3-lasso'"... do you get the same in your local env? – Akber Iqbal Dec 06 '18 at 07:56
  • It's not the problem in the local env. I have installed d3-lasso using npm. – Madara Premawardhana Dec 06 '18 at 08:58
  • Hey! did you manage to make it work ? I'm asking because I'm dealing with the same issue here. – J. Doe Jun 14 '19 at 12:06
  • J.Doe , I did not. I had to finally make a lasso tool from scratch 1. Drawing free shapes on the page making top left coordinate (0,0) 2. Identifying if we create a closed object 3. Creating a selection if the object is closed, otherwise initialize ability to draw again 4. Identify objects inside the selected area and make them selected ( change their border color ) 5. get the names of objects inside for the process you need 6. (and of course make the line of selection to a dotted line to make it more select-y) – Madara Premawardhana Feb 28 '20 at 09:38

0 Answers0