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

@evergis/react

Package Overview
Dependencies
Maintainers
6
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evergis/react - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

9

dist/hooks/useMaxMinScale.js

@@ -10,3 +10,3 @@ "use strict";

const levels = map.tileScheme.levels;
if (maxScale) {
if (maxScale !== undefined) {
const { resolution } = levels.find(byScale(maxScale)) || {

@@ -17,3 +17,3 @@ resolution: -1,

}
if (minScale) {
if (minScale !== undefined) {
const { resolution } = levels.find(byScale(minScale)) || {

@@ -24,4 +24,9 @@ resolution: -1,

}
exports.updateMapResolution(map);
}, [map, minScale, maxScale]);
};
exports.updateMapResolution = (map) => {
const newResolution = Math.min(Math.max(map.resolution, map.minResolution || 0), map.maxResolution || Number.MAX_VALUE);
map.animateTo(map.position, newResolution);
};
//# sourceMappingURL=useMaxMinScale.js.map

@@ -0,1 +1,3 @@

import { Map } from '@evergis/sgis/es/Map';
export declare const useMaxMinScale: (minScale?: number | undefined, maxScale?: number | undefined) => void;
export declare const updateMapResolution: (map: Map) => void;

@@ -8,3 +8,3 @@ import { useEffect } from 'react';

const levels = map.tileScheme.levels;
if (maxScale) {
if (maxScale !== undefined) {
const { resolution } = levels.find(byScale(maxScale)) || {

@@ -15,3 +15,3 @@ resolution: -1,

}
if (minScale) {
if (minScale !== undefined) {
const { resolution } = levels.find(byScale(minScale)) || {

@@ -22,4 +22,9 @@ resolution: -1,

}
updateMapResolution(map);
}, [map, minScale, maxScale]);
};
export const updateMapResolution = (map) => {
const newResolution = Math.min(Math.max(map.resolution, map.minResolution || 0), map.maxResolution || Number.MAX_VALUE);
map.animateTo(map.position, newResolution);
};
//# sourceMappingURL=useMaxMinScale.js.map
{
"name": "@evergis/react",
"version": "0.1.12",
"version": "0.1.13",
"description": "React components for creating GIS apps with evergis server",

@@ -5,0 +5,0 @@ "author": "everpoint",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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