Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

polylabel

Package Overview
Dependencies
Maintainers
15
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polylabel - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

2

package.json
{
"name": "polylabel",
"version": "1.0.5",
"version": "1.1.0",
"description": "A JS library for finding optimal label position inside a polygon",

@@ -5,0 +5,0 @@ "main": "polylabel.js",

@@ -28,3 +28,7 @@ 'use strict';

if (cellSize === 0) return [minX, minY];
if (cellSize === 0) {
var degeneratePoleOfInaccessibility = [minX, minY];
degeneratePoleOfInaccessibility.distance = 0;
return degeneratePoleOfInaccessibility;
}

@@ -77,3 +81,5 @@ // a priority queue of cells in order of their "potential" (max distance to polygon)

return [bestCell.x, bestCell.y];
var poleOfInaccessibility = [bestCell.x, bestCell.y];
poleOfInaccessibility.distance = bestCell.d;
return poleOfInaccessibility;
}

@@ -112,3 +118,3 @@

return (inside ? 1 : -1) * Math.sqrt(minDistSq);
return minDistSq === 0 ? 0 : (inside ? 1 : -1) * Math.sqrt(minDistSq);
}

@@ -115,0 +121,0 @@

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