Closes #2203. GetFeatureInfo active by default#2427
Closes #2203. GetFeatureInfo active by default#2427offtherailz merged 2 commits intogeosolutions-it:masterfrom
Conversation
| }), | ||
| changeMapPointer: (action$, store) => | ||
| action$.ofType(CHANGE_MOUSE_POINTER) | ||
| .filter(() => !(store.getState()).map) |
There was a problem hiding this comment.
Everytime you access the state, it is preferrable to use a selector
| .switchMap((a) => action$.ofType(MAP_CONFIG_LOADED).mapTo(a)), | ||
| onMapClick: (action$, store) => | ||
| action$.ofType(CLICK_ON_MAP).filter(() => { | ||
| const {disableAlwaysOn = false} = (store.getState()).mapInfo; |
There was a problem hiding this comment.
Ok, but here we are not computing any derivate value, so what's the meaning of using a selector?
web/client/selectors/mapinfo.js
Outdated
| const drawStatus = get(state, "draw.drawStatus", false); | ||
| return drawStatus && drawStatus !== 'clean' && drawStatus !== 'stop'; | ||
| }; | ||
| const gridEditingSelector = (state) => get(state, "featuregrid.mode") === 'EDIT'; |
There was a problem hiding this comment.
the feature grid mode selector already exists, please use that as part of this selector
There was a problem hiding this comment.
It's not exactly the same selector one select the mode, this select the editing mode, anyway If you prefer I'll change
| .switchMap(() => { | ||
| return Rx.Observable.of(closeFeatureGrid()); | ||
| }), | ||
| changeMapPointer: (action$, store) => |
There was a problem hiding this comment.
not sure about this epic, can you explain it?
There was a problem hiding this comment.
When the GFI is enabled by default, It could throw the change-map-pointer action before the map is configured so the mouse pointer action will fail
There was a problem hiding this comment.
maybe add a comment above this epic with the answer you give me. :)
Description
The GFI tool has become active by default. The user just needs to click on map to get the feature info. The GFI is stopped if Annotation or Grid plugins are editing, draw or measure support are active.
Issues
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
The GFI is enabled from the btn in toolbar. It's disabled by some other tolls but not reenabled.
What is the new behavior?
The GFI is enabled by default, and disabled/enabled under some circumstance.
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other information:
It is possible to control the GFI, by setting the state variables: enabled and disableAlwaysOn.