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

ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape #132

Merged
merged 10 commits into from
May 9, 2023

Conversation

OS-giulianasilva
Copy link
Contributor

@OS-giulianasilva OS-giulianasilva commented May 5, 2023

This PR is for fix the updated coordinates not being passed to the OnDrawChange event.

What was happening

  • It didn't exist a method o get the updated shape coordinates.
  • The updated coordinates were not being passed as an argument to the ShapeProviderEvent.

What was done

  • Created the getShapeProperties method for all shapes. This method returns the updated shape coordinates.
  • In ShapeProviderEvent: Added an argument to trigger method to pass the updated shape coordinates.
  • In AbstractDrawShape: Modified the _setOnChangeEvent method to pass the updated shape coordinates when triggering the DrawingToolsEvent.
  • In AbstractProviderEvent:
    • Created the _triggerShapeChangedEvent method that get the updated shape coordinates and trigger the Shape event.
    • In the _buildProvider method, passed the _triggerShapeChangedEvent as the providerObjectListener handler.

Test Steps

  1. Go to a page with Maps with DrawingTools AddIOns
  2. Create a shape
  3. Modify the shape
  4. Check if the Coordinates and Location parameters of OnDrawingChange event changed accordingly.

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 8, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
51.1% 51.1% Duplication

Copy link
Contributor

@rugoncalves rugoncalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

@OS-giulianasilva OS-giulianasilva merged commit dddcd01 into dev May 9, 2023
@OS-giulianasilva OS-giulianasilva deleted the ROU-4222 branch May 9, 2023 12:47
OS-giulianasilva added a commit that referenced this pull request Jun 29, 2023
* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------

Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

---------

Co-authored-by: gbnm <goncalo.martins@outsystems.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>
bmarcelino-fe added a commit that referenced this pull request Dec 13, 2023
* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------

Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Update Map.css

Added CSS class .runtime-staticMap-container-hide

* Update Map.css

* Increase Maps version to 1.6.7

* Adding git action

* Adding workflow to generate documentation in dev

* Changes in workflows

* Create main-push.yml

* Changing workflow name

* Update dev-pr.yml

* Moving actions into folder

* Chaning workflow to use new folder

* Adding types to events

* Missing parameter, when not passed structure

* Missing parameter

* Initial changes

* Lint changes

* Changing input from value to propertyValue

* Improving variable name

* Fixing sonarcloud findings

* Sonar cloud feedback

* More sonarcloud feedback

* Changing the way addresses are converted

* Removing the apiKey parameter

* Adding sonarcloud lint

* Fix auto merge problem

* Add function to easily check if a number is valid

* Explicitly set type of size as number

* Validating that height and width are bigger than 0

* Fix duplicated methods on Circle

---------

Co-authored-by: gbnm <goncalo.martins@outsystems.com>
Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>
Co-authored-by: rug <rmfgoncalves@gmail.com>
bmarcelino-fe added a commit that referenced this pull request Dec 14, 2023
* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------

Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Update Map.css

Added CSS class .runtime-staticMap-container-hide

* Update Map.css

* Increase Maps version to 1.6.7

* Adding git action

* Adding workflow to generate documentation in dev

* Changes in workflows

* Create main-push.yml

* Changing workflow name

* Update dev-pr.yml

* Moving actions into folder

* Chaning workflow to use new folder

* Adding types to events

* Missing parameter, when not passed structure

* Missing parameter

* Initial changes

* Lint changes

* Changing input from value to propertyValue

* Improving variable name

* Fixing sonarcloud findings

* Sonar cloud feedback

* More sonarcloud feedback

* Changing the way addresses are converted

* Removing the apiKey parameter

* Adding sonarcloud lint

* Fix auto merge problem

* Add function to easily check if a number is valid

* Explicitly set type of size as number

* Validating that height and width are bigger than 0

* Updated Version 1.6.8 and added .snyk file

Updated Version 1.6.8 and added .snyk file

* ROU-4431: Migrate OS Maps into ODC Maps v1.6.7 (#147)

* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------

Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Update Map.css

Added CSS class .runtime-staticMap-container-hide

* Update Map.css

* Increase Maps version to 1.6.7

* Adding git action

* Adding workflow to generate documentation in dev

* Changes in workflows

* Create main-push.yml

* Changing workflow name

* Update dev-pr.yml

* Moving actions into folder

* Chaning workflow to use new folder

* Adding types to events

* Missing parameter, when not passed structure

* Missing parameter

* Initial changes

* Lint changes

* Changing input from value to propertyValue

* Improving variable name

* Fixing sonarcloud findings

* Sonar cloud feedback

* More sonarcloud feedback

* Changing the way addresses are converted

* Removing the apiKey parameter

* Adding sonarcloud lint

* Fix auto merge problem

* Add function to easily check if a number is valid

* Explicitly set type of size as number

* Validating that height and width are bigger than 0

* Fix duplicated methods on Circle

---------

Co-authored-by: gbnm <goncalo.martins@outsystems.com>
Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>
Co-authored-by: rug <rmfgoncalves@gmail.com>

---------

Co-authored-by: gbnm <goncalo.martins@outsystems.com>
Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>
Co-authored-by: rug <rmfgoncalves@gmail.com>
bmarcelino-fe added a commit that referenced this pull request Dec 14, 2023
* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------



* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Update Map.css

Added CSS class .runtime-staticMap-container-hide

* Update Map.css

* Increase Maps version to 1.6.7

* Adding git action

* Adding workflow to generate documentation in dev

* Changes in workflows

* Create main-push.yml

* Changing workflow name

* Update dev-pr.yml

* Moving actions into folder

* Chaning workflow to use new folder

* Adding types to events

* Missing parameter, when not passed structure

* Missing parameter

* Initial changes

* Lint changes

* Changing input from value to propertyValue

* Improving variable name

* Fixing sonarcloud findings

* Sonar cloud feedback

* More sonarcloud feedback

* Changing the way addresses are converted

* Removing the apiKey parameter

* Adding sonarcloud lint

* Fix auto merge problem

* Add function to easily check if a number is valid

* Explicitly set type of size as number

* Validating that height and width are bigger than 0

* Updated Version 1.6.8 and added .snyk file

Updated Version 1.6.8 and added .snyk file

* ROU-4431: Migrate OS Maps into ODC Maps v1.6.7 (#147)

* Update asset version to 1.6.6

Updated asset version to 1.6.6.

* ROU-4222: DrawCircle AddOn does not pass coordinates when editing a shape (#132)

* Fix issue with Leaflet OnDrawingChange event

* Remove unnecessary arguments

* Fix OnDrawChange event for Google Maps

* Remove unnecessary arguments and comments

* Add comments

* Fix eslint errors

* Fix Code smell

* Removed repeated code

* Add shape types

* Update ShapeProviderEvent.ts

* ROU-4283 - [OSMaps] - Leaflet and Google Maps - DrawCircle AddOn does not pass coordinates when editing a shape (#133)

* - fix coords sended on the coordinates parameter of triggerOnDrawingChangeEvent;

* - change the return location on draging end (draw marker);

---------



* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Revert "Update Images.css"

This reverts commit 96154f3.

* Update Images.css

Includes the changes made in ROU-4361 in order to replace the base 64 for the CSS vars → --map-container-image-google and --map-container-image-leaflet

* Update Map.css

Added CSS class .runtime-staticMap-container-hide

* Update Map.css

* Increase Maps version to 1.6.7

* Adding git action

* Adding workflow to generate documentation in dev

* Changes in workflows

* Create main-push.yml

* Changing workflow name

* Update dev-pr.yml

* Moving actions into folder

* Chaning workflow to use new folder

* Adding types to events

* Missing parameter, when not passed structure

* Missing parameter

* Initial changes

* Lint changes

* Changing input from value to propertyValue

* Improving variable name

* Fixing sonarcloud findings

* Sonar cloud feedback

* More sonarcloud feedback

* Changing the way addresses are converted

* Removing the apiKey parameter

* Adding sonarcloud lint

* Fix auto merge problem

* Add function to easily check if a number is valid

* Explicitly set type of size as number

* Validating that height and width are bigger than 0

* Fix duplicated methods on Circle

---------







---------

Co-authored-by: gbnm <goncalo.martins@outsystems.com>
Co-authored-by: Giuliana Silva <108938618+OS-giulianasilva@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: OUTSYSTEMS\fmj <joao.maneul.ferreira@outsystems.com>
Co-authored-by: rug <rmfgoncalves@gmail.com>
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.

3 participants