@evergis/react 2.0.195 → 2.0.197
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Legend/types.d.ts +3 -1
- package/dist/core/classification/types.d.ts +1 -1
- package/dist/react.cjs.development.js +11 -4
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +11 -4
- package/dist/react.esm.js.map +1 -1
- package/dist/utils/legend.d.ts +2 -0
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ import { H3Symbol } from '@evergis/sgis/es/symbols/H3Symbol';
|
|
|
5
5
|
import { Coordinates } from '@evergis/sgis/es/baseTypes';
|
|
6
6
|
import { ClassificationParameterExtended, LayerAttribute, LegendValueType, ParameterByAttribute, ParameterValueWithSymbol, StyleSymbolType, SvgPointSymbol } from '../../core';
|
|
7
7
|
import { SGisBrushFill, SGisImageFill, SGisPolygonSymbol, SGisPolylineSymbol } from '../../symbols';
|
|
8
|
-
export declare type ClassifyParameter = 'fill.color' | 'fill.hatchColor' | 'fillColor' | 'stroke.width' | 'stroke.color' | 'strokeWidth' | 'strokeColor' | 'textBackground.fill.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'fontColor' | 'haloColor' | 'size' | 'symbol' | 'angle' | 'maskedColor' | 'endingSize' | 'beginningSize' | 'maxObjectCount' | 'gridSize' | 'selectionObjectsLimit' | 'singleObjectSymbol.figure.fillColor' | 'singleObjectSymbol.background.fillColor';
|
|
8
|
+
export declare type ClassifyParameter = 'fill.color' | 'fill.hatchColor' | 'fillColor' | 'stroke.width' | 'stroke.color' | 'strokeWidth' | 'strokeColor' | 'textBackground.fill.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'figure.strokeColor' | 'figure.strokeWidth' | 'fontColor' | 'haloColor' | 'size' | 'symbol' | 'angle' | 'maskedColor' | 'endingSize' | 'beginningSize' | 'maxObjectCount' | 'gridSize' | 'selectionObjectsLimit' | 'singleObjectSymbol.figure.fillColor' | 'singleObjectSymbol.background.fillColor';
|
|
9
9
|
export interface ParameterInfo {
|
|
10
10
|
min: number;
|
|
11
11
|
max: number;
|
|
@@ -82,6 +82,8 @@ export declare type SvgEditorField = Pick<SvgPointSymbol, 'size' | 'offset' | 'a
|
|
|
82
82
|
'background.fillColor': string;
|
|
83
83
|
'background.strokeColor': string;
|
|
84
84
|
'background.strokeWidth': string;
|
|
85
|
+
'figure.strokeColor': string;
|
|
86
|
+
'figure.strokeWidth': string;
|
|
85
87
|
'figure.fillColor': string;
|
|
86
88
|
};
|
|
87
89
|
export declare type MinimizedLegendProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassifyAble, ParameterValue, ParameterValueWithSymbol } from '../style';
|
|
2
2
|
import { ClassificationAttribute } from '../attributes';
|
|
3
|
-
export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor';
|
|
3
|
+
export declare type NestedClassificationParameters = 'fill.color' | 'fill.hatchColor' | 'stroke.width' | 'stroke.color' | 'background.fillColor' | 'background.strokeColor' | 'background.strokeWidth' | 'figure.fillColor' | 'figure.strokeColor' | 'figure.strokeWidth';
|
|
4
4
|
export declare type SimpleClassificationParameters = 'fillColor' | 'strokeColor' | 'strokeWidth' | 'size' | 'symbol' | 'angle' | 'maskedColor';
|
|
5
5
|
export declare type ClassificationParameter = NestedClassificationParameters | SimpleClassificationParameters;
|
|
6
6
|
export declare type ClassificationParameterExtended = ClassificationParameter | 'width' | 'height';
|
|
@@ -3012,7 +3012,7 @@ const getLegendSymbolSize = symbol => {
|
|
|
3012
3012
|
return Math.max(DEFAULT_LEGEND_SYMBOL_SIZE, size);
|
|
3013
3013
|
};
|
|
3014
3014
|
const serializeSvgPointSymbol = symbol => {
|
|
3015
|
-
var _symbol$figure, _symbol$background2, _symbol$background3, _symbol$background4, _symbol$background5;
|
|
3015
|
+
var _symbol$figure, _symbol$background2, _symbol$background3, _symbol$background4, _symbol$background5, _symbol$figure2, _symbol$figure3;
|
|
3016
3016
|
|
|
3017
3017
|
if (!symbol) return null;
|
|
3018
3018
|
const figureFillColor = ((_symbol$figure = symbol.figure) == null ? void 0 : _symbol$figure.fillColor) || null;
|
|
@@ -3033,7 +3033,9 @@ const serializeSvgPointSymbol = symbol => {
|
|
|
3033
3033
|
} : {}, figureFillColor ? {
|
|
3034
3034
|
figure: {
|
|
3035
3035
|
id: 'symbol-figure',
|
|
3036
|
-
fillColor: figureFillColor
|
|
3036
|
+
fillColor: figureFillColor,
|
|
3037
|
+
strokeColor: ((_symbol$figure2 = symbol.figure) == null ? void 0 : _symbol$figure2.strokeColor) || null,
|
|
3038
|
+
strokeWidth: ((_symbol$figure3 = symbol.figure) == null ? void 0 : _symbol$figure3.strokeWidth) || null
|
|
3037
3039
|
}
|
|
3038
3040
|
} : {});
|
|
3039
3041
|
};
|
|
@@ -3145,7 +3147,7 @@ const DEFAULT_CLUSTER_SVG = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox
|
|
|
3145
3147
|
const SYMBOL_CLASSIFICATION = {
|
|
3146
3148
|
[api.GeometryType.Polygon]: ['fill.color', 'stroke.color', 'stroke.width'],
|
|
3147
3149
|
[api.GeometryType.Polyline]: ['stroke.color', 'stroke.width'],
|
|
3148
|
-
[api.GeometryType.Point]: ['angle', 'size', 'fill.color', 'fillColor', 'background.fillColor', 'background.strokeColor', 'background.strokeWidth', 'figure.fillColor', 'singleObjectSymbol.figure.fillColor', 'singleObjectSymbol.background.fillColor']
|
|
3150
|
+
[api.GeometryType.Point]: ['angle', 'size', 'fill.color', 'fillColor', 'background.fillColor', 'background.strokeColor', 'background.strokeWidth', 'figure.fillColor', 'figure.strokeColor', 'figure.strokeWidth', 'singleObjectSymbol.figure.fillColor', 'singleObjectSymbol.background.fillColor']
|
|
3149
3151
|
};
|
|
3150
3152
|
const SYMBOL_LIMITS = {
|
|
3151
3153
|
SIZE_MIN: 1,
|
|
@@ -3314,11 +3316,16 @@ const manipulateSvgSymbol = _ref2 => {
|
|
|
3314
3316
|
SVGContainer.svg(innerSvg);
|
|
3315
3317
|
}
|
|
3316
3318
|
} else {
|
|
3319
|
+
const strokeColor = getParameterValue(figure == null ? void 0 : figure.strokeColor);
|
|
3320
|
+
const strokeWidth = getParameterValue(figure == null ? void 0 : figure.strokeWidth) || (typeof (figure == null ? void 0 : figure.strokeColor) === 'object' ? 1 : 0);
|
|
3317
3321
|
const fillColor = getParameterValue(figure == null ? void 0 : figure.fillColor);
|
|
3318
3322
|
SVGContainer.size(currentSize + "px", currentSize + "px").viewbox(viewBox.join(' '));
|
|
3319
3323
|
SVGContainer.svg(innerSvg);
|
|
3320
3324
|
SVGContainer.find('#symbol-figure').each(item => {
|
|
3321
|
-
item.center(DEFAULT_SYMBOL_SIZE / 2, DEFAULT_SYMBOL_SIZE / 2).fill(fillColor || DEFAULT_SYMBOL_FILL_COLOR)
|
|
3325
|
+
item.center(DEFAULT_SYMBOL_SIZE / 2, DEFAULT_SYMBOL_SIZE / 2).fill(fillColor || DEFAULT_SYMBOL_FILL_COLOR).stroke({
|
|
3326
|
+
color: strokeColor,
|
|
3327
|
+
width: strokeWidth
|
|
3328
|
+
});
|
|
3322
3329
|
});
|
|
3323
3330
|
}
|
|
3324
3331
|
}
|