New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-geometryutil

Package Overview
Dependencies
Maintainers
5
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-geometryutil - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

.install.stamp

2

package.json
{
"name": "leaflet-geometryutil",
"version": "0.9.0",
"version": "0.9.1",
"description": "Leaflet utility functions on geometries",

@@ -5,0 +5,0 @@ "keywords": [

@@ -52,2 +52,6 @@ Leaflet.GeometryUtil

### 0.9.1 ###
* Fix `locateOnLine()` doesn't return correct subline (#79, thanks @lepetittim)
### 0.9.0 ###

@@ -54,0 +58,0 @@

describe('Locate on line', function() {
var line = L.polyline([[0,0], [1, 1], [2, 2]]);
var line_narrow_angle = L.polyline([[0,0], [0, 40], [9, 0]])

@@ -20,2 +21,8 @@ it('It should return 0 if start', function(done) {

});
it('It should return ratio of point', function(done) {
assert.almostEqual(0.433, L.GeometryUtil.locateOnLine(map, line_narrow_angle, L.latLng([0, 35])), 4);
assert.almostEqual(0.559, L.GeometryUtil.locateOnLine(map, line_narrow_angle, L.latLng([1.5, 35])), 3);
done();
});
});

@@ -543,3 +543,3 @@ // Packaging/modules magic dance.

portion = lengths[i];
if (L.GeometryUtil.belongsSegment(point, l1, l2)) {
if (L.GeometryUtil.belongsSegment(point, l1, l2, 0.0001)) {
portion += l1.distanceTo(point);

@@ -546,0 +546,0 @@ found = true;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc