Falke-Design / PMOrtho

Leaflet PMOrtho: Adds Ortho mode (45° steps) to Polyline, Polygon and Rectangle while shift holding
7 stars 2 forks source link

Snap Angle #1

Closed mike16889 closed 4 years ago

mike16889 commented 4 years ago

Great work on this.

Had the need to snap to angles smaller than 45° so modified it a little to accept a 'snapAngle' option.

If you want I can provide the code I used to achieve this.

Also trying to figure out how to have an option to calculate the angle based off the prevision points (so if you have it set to 45°'s, then draw the first segment of a line at 15°, the next point will be at 0/45°/90/... from that line). Have not had any luck so far.

Falke-Design commented 4 years ago

Yes pls create a PR this would be a nice addition and maybe I can you help then with your second feature.

mike16889 commented 4 years ago

Done. First ever pull request.

Falke-Design commented 4 years ago

@mike16889 thx for your PR! Also I added the option baseAngleOfLastSegment with that option the angle is based of the line / points before