Socket
Socket
Sign inDemoInstall

@planet/dynamic-tiles

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet/dynamic-tiles - npm Package Compare versions

Comparing version 1.0.0-beta3 to 1.0.0-beta4

18

maths.js

@@ -101,5 +101,7 @@ "use strict";

function computeRanges(histogram) {
var minAlloc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
var loThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
var hiThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.5;
var bandRanges = [];
var allocThreshold = Math.floor(minAlloc / 100 * histogram.cnt);
var loAllocThreshold = Math.floor(loThreshold / 100 * histogram.cnt);
var hiAllocThreshold = Math.floor(hiThreshold / 100 * histogram.cnt);

@@ -109,3 +111,4 @@ for (var b = 0, bb = histogram.length; b < bb; b++) {

var high = null;
var alloc = 0;
var hiAlloc = 0;
var loAlloc = 0;
var bandLen = histogram[b].length;

@@ -116,7 +119,6 @@

if (histogram[b][i] > 0) {
alloc += histogram[b][i];
loAlloc += histogram[b][i];
if (alloc > allocThreshold) {
if (loAlloc > loAllocThreshold) {
low = i;
alloc = 0;
}

@@ -128,5 +130,5 @@ }

if (histogram[b][_i] > 0) {
alloc += histogram[b][_i];
hiAlloc += histogram[b][_i];
if (alloc > allocThreshold) {
if (hiAlloc > hiAllocThreshold) {
high = _i;

@@ -133,0 +135,0 @@ }

@@ -106,3 +106,2 @@ "use strict";

args.tileLoadFunction = function (tile, src) {
// configureNumpyTile(tile);
tile.bands = _this.getBands();

@@ -327,3 +326,3 @@ _this.loading_ = true;

key: "getHistogram",
value: function getHistogram(view) {
value: function getHistogram(view, partial) {
var _this4 = this;

@@ -334,3 +333,3 @@

// return the new histogram
if (!_this4.loading_) {
if (!_this4.loading_ || partial === true) {
resolve(_this4.calculateHistogram(view));

@@ -337,0 +336,0 @@ } else {

{
"name": "@planet/dynamic-tiles",
"version": "1.0.0-beta3",
"version": "1.0.0-beta4",
"description": "Support for dynamically colored tiles from Planet Inc. tile servers.",

@@ -5,0 +5,0 @@ "main": "./ol.js",

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