Skip to content

Commit

Permalink
geosolutions-it#10424: The measure tool is not opened properly if Mea…
Browse files Browse the repository at this point in the history
…sure plugin has 'showCoordinateEditor' with true into cfg.defaultOptions

Description:
-change the added class name to a more generic name
  • Loading branch information
mahmoudadel54 committed Jun 20, 2024
1 parent 357cc90 commit 2cd195b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/client/plugins/Measure.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const MeasurePlugin = connect(
}))
)(({coordsAeronauticalEnabled, ...props}) => {
return (
<div className={props.mapType !== MapLibraries.CESIUM && props?.defaultOptions?.showCoordinateEditor ? "measure-container measure-coords-editor-2d" : "measure-container"} style={{top: coordsAeronauticalEnabled ? 88 : 48}}>
<div className={props.mapType !== MapLibraries.CESIUM && props?.defaultOptions?.showCoordinateEditor ? "measure-container measure-coords-editor" : "measure-container"} style={{top: coordsAeronauticalEnabled ? 88 : 48}}>
{
props.mapType === MapLibraries.CESIUM
? <div id="measure-cesium-wrapper"/>
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/__tests__/Measure-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Measure Plugin', () => {
it('test measure in case default options showCoordinateEditor = true', () => {
const { Plugin} = getPluginForTest(Measure, { controls: { measure: { enabled: true } } });
ReactDOM.render(<Plugin defaultOptions={{showCoordinateEditor: true}} />, document.getElementById("container"));
const measureCoordEditor2DNode = document.querySelector('.measure-container.measure-coords-editor-2d');
const measureCoordEditor2DNode = document.querySelector('.measure-container.measure-coords-editor');
expect(measureCoordEditor2DNode).toBeTruthy();
const measureToolbarNode = document.querySelector('.ms-measure-toolbar');
expect(measureToolbarNode).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion web/client/themes/default/less/measure.less
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
}
}
}
.measure-container:not(.measure-coords-editor-2d){
.measure-container:not(.measure-coords-editor){
position: absolute;
z-index: 100;
right: 46px;
Expand Down

0 comments on commit 2cd195b

Please sign in to comment.