Skip to content

DrawSupport:Replace does not add drawinteraction by default#2581

Merged
mbarto merged 2 commits intogeosolutions-it:masterfrom
ndufrane:drawsupport_replace
Mar 8, 2018
Merged

DrawSupport:Replace does not add drawinteraction by default#2581
mbarto merged 2 commits intogeosolutions-it:masterfrom
ndufrane:drawsupport_replace

Conversation

@ndufrane
Copy link
Copy Markdown
Contributor

@ndufrane ndufrane commented Feb 2, 2018

Description

Hi,

This PR change a little bit the drawsupport replace function as proposed here https://groups.google.com/forum/#!topic/mapstore-developers/s3A77gAHleU

It add the possibility to choose to add interactions whit the drawEnabled option. By default, it's false.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Refactoring (no functional changes, no api changes)

What is the current behavior? (You can also link to an open issue here)
DrawSupport : When the draw layer is not defined and replace function is called. The draw layer is initialized with draw interactions by default : call to add layer with True hardcoded

What is the new behavior?
DrawSupport : When the draw layer is not defined and replace function is called. The draw layer is NOT initialized with draw interactions by default : call to add layer use options.drawEnabled parameter. By default the value is False/

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • [x ] Yes

This PR may introduce breaking change. As described before the current behavior is to add by default the interactions when using replace. And this PR set the default to false. If it is not possible or correct to use "False" by default , i can change this PR to have the same default behaviour

Other information:

If tests case are needed, please let me know

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 2, 2018

Coverage Status

Coverage decreased (-0.2%) to 80.497% when pulling 3df4478 on ndufrane:drawsupport_replace into 14f93ba on geosolutions-it:master.

@tdipisa tdipisa added the review label Feb 2, 2018
@offtherailz offtherailz requested a review from mbarto February 2, 2018 17:24
@tdipisa tdipisa removed the backlog label Feb 2, 2018
@mbarto
Copy link
Copy Markdown
Contributor

mbarto commented Feb 15, 2018

The PR looks good. Any chance you can add a unit test?

@ndufrane
Copy link
Copy Markdown
Contributor Author

Ok for the unit test. I will update the pr when it's done 📦

@mbarto mbarto merged commit 3cdff74 into geosolutions-it:master Mar 8, 2018
@ghost ghost removed the review label Mar 8, 2018
@tdipisa tdipisa self-assigned this Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants