L.Pather
L.Pather copied to clipboard
JSXTransformer.js not available in download package
I downloaded the code from your github. But the required files are not available in package. vendor folder seems empty. Downloaded required files from internet but JSXTransformer.js file I am unable to find. Thus I am unable to run your code. Can you please suggest how should I proceed? Thanks in advance.
You need to install the dependencies using npm install
and then bower install
– with the latter being the command that populates the vendor
directory :+1:
If you don't have bower
installed then try: npm i bower -g
on your system.
Done. Thanks alot for the help :) . Can you please help on this query also? I am following similar implementation as given in http://pather.herokuapp.com/ , but I can't find any way to append another line in the drawn line. I just want to create a tree like structure using this. Like draw a line and then create different branches emerging from the source line. Is it possible?
I'm afraid it's only lines – not branches from those lines, unless they're different lines. I don't suppose it would be that difficult to implement, but I'm not sure how you'd programatically represent the tree to say: extend this line from point 5
.
There is L.Pather.MODE.APPEND mode available so I thought I can append new line from any point in existing line. But this onlly appends a elbow. Any way to do this ?? Also is there any way to enable pather on map and disable pather on map. For ex: "Enable" button to trigger drawing using pather and then "Disable" button to stop pather drawing and free mouse for other map operations? I am trying this
function drawSpline(){ map.addLayer(pather); pather.setMode(L.Pather.MODE.ALL); }
function stopSpline(){ pather.setMode(L.Pather.MODE.VIEW); }