File tree Expand file tree Collapse file tree 3 files changed +6
-33
lines changed
packages/base/src/dialogs/symbology Expand file tree Collapse file tree 3 files changed +6
-33
lines changed Original file line number Diff line number Diff line change @@ -144,37 +144,6 @@ const ColorRampControls: React.FC<IColorRampControlsProps> = ({
144144 return ;
145145 }
146146
147- // update shared model symbology state from component state
148- useEffect ( ( ) => {
149- if ( renderType === 'Heatmap' ) {
150- return ;
151- }
152-
153- if ( ! layerParams . symbologyState ) {
154- layerParams . symbologyState = { } ;
155- }
156- layerParams . symbologyState = {
157- ...layerParams . symbologyState ,
158- dataMin,
159- dataMax,
160- min : minValue ,
161- max : maxValue ,
162- colorRamp : selectedRamp ,
163- reverse : reverseRamp ,
164- nClasses : numberOfShades ,
165- mode : selectedMode ,
166- } ;
167- } , [
168- minValue ,
169- maxValue ,
170- selectedRamp ,
171- reverseRamp ,
172- selectedMode ,
173- numberOfShades ,
174- dataMin ,
175- dataMax ,
176- ] ) ;
177-
178147 return (
179148 < div className = "jp-gis-color-ramp-container" >
180149 { showRampSelector && (
Original file line number Diff line number Diff line change 11import { Button } from '@jupyterlab/ui-components' ;
22import React from 'react' ;
33
4- import { IColorRampDefinition } from '@/src/types' ;
4+ import { IColorRampDefinition , ClassificationMode } from '@/src/types' ;
55
66export interface IColorRampValueControlsProps {
77 selectedMin : number | undefined ;
@@ -16,7 +16,7 @@ export interface IColorRampValueControlsProps {
1616 | 'Singleband Pseudocolor' ;
1717 dataMin ?: number ;
1818 dataMax ?: number ;
19- selectedMode : string ; // TODO: should be ClssificationMode (https://github.com/geojupyter/jupytergis/pull/937)
19+ selectedMode : ClassificationMode ;
2020}
2121export const ColorRampValueControls : React . FC <
2222 IColorRampValueControlsProps
Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ const Graduated: React.FC<ISymbologyTabbedDialogWithAttributesProps> = ({
208208 mode : colorRampOptionsRef . current ?. selectedMode ,
209209 min : colorRampOptionsRef . current ?. minValue ,
210210 max : colorRampOptionsRef . current ?. maxValue ,
211+ dataMin : colorRampOptionsRef . current ?. dataMin ,
212+ dataMax : colorRampOptionsRef . current ?. dataMax ,
211213 } ;
212214
213215 if ( layer . type === 'HeatmapLayer' ) {
@@ -236,6 +238,8 @@ const Graduated: React.FC<ISymbologyTabbedDialogWithAttributesProps> = ({
236238 minValue,
237239 maxValue,
238240 criticalValue,
241+ dataMin,
242+ dataMax,
239243 } ) ;
240244
241245 let stops : number [ ] ;
You can’t perform that action at this time.
0 commit comments