Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Remove all annotations geometry' doesn't work properly without setting initial state #4182

Closed
4 tasks
francoxyz opened this issue Sep 11, 2019 · 3 comments
Closed
4 tasks

Comments

@francoxyz
Copy link
Contributor

francoxyz commented Sep 11, 2019

Description

Without setting the initial state:

     "annotations": {
      "config": {
        "multiGeometry": true,
        "validationErrors": {}
      },
      "format": "decimal",
      "defaultTextAnnotation": "New"
    },

When I create a new annotation geometry and I save it, the buttom 'Remove all annotations geometry' doesn't remove the annotation immediatly. The annotation is only removed after clicking on 'back' and 'confirm'

Anno

In case of Bug (otherwise remove this paragraph)

Browser Affected
(use this site: https://www.whatsmybrowser.org/ for non expert users)

  • Internet Explorer
  • Chrome
  • Firefox
  • Safari

Browser Version Affected

  • Indicate the browser version in which the issue has been found

Steps to reproduce

  • localConfig.json should contain "Annotations" plugin, with no annotations initialState set.
  • Open Mapstore
  • Open a random map
  • Open Burger Menu
  • Click on 'Annotations'
  • Click on 'New'
  • Click on 'Add New Geometry'
  • Click on 'Marker'
  • Click on the map
  • Click on 'Save'
  • Click on 'Remove all annotations geometry'
  • Click on ' Confirm'

Expected Result

  • The geometry shouldn't be displayed

Current Result

  • The geometry is still displayed

Other useful information (optional):

See #3852

@kasongoyo
Copy link
Contributor

@francoperversi & @tdipisa. It seems to work as expected on my side. see

MapStore HomePage

@MV88
Copy link
Contributor

MV88 commented Sep 13, 2019

@kasongoyo have you removed the initial state of annotation in localConfig.json?

to me it seems not, notice how the pencil (with plus) does not disables.

please check if it is related to the mutliGeometry set to false (or not being set, i.e. defaults which is falsy).

@kasongoyo
Copy link
Contributor

@kasongoyo have you removed the initial state of annotation in localConfig.json?

to me it seems not, notice how the pencil (with plus) does not disables.

please check if it is related to the mutliGeometry set to false (or not being set, i.e. defaults which is falsy).

@MV88 You're right. I forgot to remove the initial state. Now I can replicate, thanks

kasongoyo added a commit to kasongoyo/MapStore2 that referenced this issue Sep 13, 2019
@tdipisa tdipisa reopened this Sep 16, 2019
kasongoyo added a commit to kasongoyo/MapStore2 that referenced this issue Sep 17, 2019
… initial state (geosolutions-it#4193)

* Fix geosolutions-it#4182 Remove all annotations geometry fail without initial state

* fixes following PR comments

* improve selector test
tdipisa pushed a commit that referenced this issue Sep 17, 2019
…4193) (#4210)

* Fix #4182 Remove all annotations geometry fail without initial state

* fixes following PR comments

* improve selector test
@francoxyz francoxyz self-assigned this Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants