@evergis/react
Advanced tools
Comparing version 0.1.17 to 0.1.18
@@ -9,3 +9,3 @@ "use strict"; | ||
const useLayerVisibility_1 = require("./useLayerVisibility"); | ||
function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }) { | ||
function useEvergisDynamicLayer({ name, zIndex, style, condition, isDisplayed, }) { | ||
const api = EvergisContext_1.useEvergisContext(); | ||
@@ -16,7 +16,8 @@ const { map } = MapContext_1.useMapContext(); | ||
destructor: layer => map.indexOf(layer) !== -1 && map.removeLayer(layer), | ||
update: (layer, [name, style]) => { | ||
update: (layer, [name, style, condition]) => { | ||
layer.name = name; | ||
layer.style = style; | ||
layer.condition = condition; | ||
}, | ||
}, [name, style]); | ||
}, [name, style, condition]); | ||
useLayerOrder_1.useLayerOrder(layer, zIndex); | ||
@@ -23,0 +24,0 @@ useLayerVisibility_1.useLayerVisibility(layer, isDisplayed); |
import { EvergisDynamicLayer, EvergisDynamicLayerParams } from '@evergis/api/es/layers/EvergisDynamicLayer'; | ||
import { LayerProps } from './LayerProps'; | ||
export declare function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }: EvergisDynamicLayerProps): EvergisDynamicLayer; | ||
export declare function useEvergisDynamicLayer({ name, zIndex, style, condition, isDisplayed, }: EvergisDynamicLayerProps): EvergisDynamicLayer; | ||
export declare type EvergisDynamicLayerProps = EvergisDynamicLayerParams & LayerProps; |
@@ -7,3 +7,3 @@ import { useProperty } from './useProperty'; | ||
import { useLayerVisibility } from './useLayerVisibility'; | ||
export function useEvergisDynamicLayer({ name, zIndex, style, isDisplayed, }) { | ||
export function useEvergisDynamicLayer({ name, zIndex, style, condition, isDisplayed, }) { | ||
const api = useEvergisContext(); | ||
@@ -14,7 +14,8 @@ const { map } = useMapContext(); | ||
destructor: layer => map.indexOf(layer) !== -1 && map.removeLayer(layer), | ||
update: (layer, [name, style]) => { | ||
update: (layer, [name, style, condition]) => { | ||
layer.name = name; | ||
layer.style = style; | ||
layer.condition = condition; | ||
}, | ||
}, [name, style]); | ||
}, [name, style, condition]); | ||
useLayerOrder(layer, zIndex); | ||
@@ -21,0 +22,0 @@ useLayerVisibility(layer, isDisplayed); |
{ | ||
"name": "@evergis/react", | ||
"version": "0.1.17", | ||
"version": "0.1.18", | ||
"description": "React components for creating GIS apps with evergis server", | ||
@@ -38,2 +38,3 @@ "author": "everpoint", | ||
"devDependencies": { | ||
"@evergis/api": "^0.1.53", | ||
"@types/jest": "^24.0.15", | ||
@@ -48,4 +49,3 @@ "@types/node": "^12.6.2", | ||
"tsc-watch": "^2.2.1", | ||
"typescript": "^3.5.2", | ||
"@evergis/api": "^0.1.14" | ||
"typescript": "^3.5.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "browserslist": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86424
1111