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

feat(draw): Drawing coordinate label #1092

Merged
merged 98 commits into from
Nov 30, 2022
Merged

feat(draw): Drawing coordinate label #1092

merged 98 commits into from
Nov 30, 2022

Conversation

kalvinkhuu
Copy link
Contributor

Please check if the PR fulfills these requirements

What is the current behavior? (You can also link to an open issue here)
Link to the issue

What is the new behavior?

  1. User can add coordinates, length and area values as the label with respective units
  2. User can now press the pencil icon to edit the drawing's label
  3. UI redesign on the popup dialog

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Other information:
This branch is based off the branch DessinPlusieursCouches2.0. After the PR of that branch is pushed through, the changes should not be as big as it is initially.

kalvinkhuu added 30 commits May 19, 2022 10:33
   * In the store, each entities have their own style, but when applying the style,
   * the setStyle function does not recognize each entities
   *
   * TODO:
   *  Either redo the setStyle function to take in entities or find a
   *  way to change the features inside the store
   *
   *  When changing the label, set the style to the original style
   *
   *  Repeat this for all colors
   *
   *  Remove any useless things and add comments
draw.interface.ts:
	Add attributes for color stroke and color fill
draw.component.ts:
	Change the global variables of fillForm and strokeForm
	Create functions to return their color stroke and fill
	Do a similar thing as onFontChange
draw-style.service.ts
(Housecleaning: Change the variable for the properties of each features)
Bugs:
- When moving the drawing, it resets the color and the font
- When the user edits the label, it bugs the whole website
Might change the design of the page
Started playing with the design of the page
Need to clean the code and work on if it is an icon
Uses the length of the store ()
@PhilippeLafreniere18 PhilippeLafreniere18 changed the title Drawing coordinate label feat(draw): Drawing coordinate label Sep 22, 2022
Copy link
Member

@pelord pelord left a comment

Choose a reason for hiding this comment

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

allow area and perimeters for polygon? (check box?)
when you edit a polygon with label.. his current label type is not checked.

@PhilippeLafreniere18
Copy link
Contributor

allow area and perimeters for polygon? (check box?) when you edit a polygon with label.. his current label type is not checked.

Fix

Copy link
Member

@pelord pelord left a comment

Choose a reason for hiding this comment

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

1-more digits on coordinates
2- translate A: for polygon area,

@pelord pelord merged commit f9e3fe0 into next Nov 30, 2022
@pelord pelord deleted the DrawingCoordinateLabel branch November 30, 2022 18:43
@pelord pelord linked an issue Dec 8, 2022 that may be closed by this pull request
cbourget pushed a commit that referenced this pull request Mar 21, 2023
…th,perimeter)(#1092)

* Merge branch 'DrawingGestionOnLabels' into DessinGestionDesEtiquettes

* Progress in the selection of the element

   * In the store, each entities have their own style, but when applying the style,
   * the setStyle function does not recognize each entities
   *
   * TODO:
   *  Either redo the setStyle function to take in entities or find a
   *  way to change the features inside the store
   *
   *  When changing the label, set the style to the original style
   *
   *  Repeat this for all colors
   *
   *  Remove any useless things and add comments

* Working selection of an element for font size and font style

Need to do onColorChange

* TODO next week

draw.interface.ts:
	Add attributes for color stroke and color fill
draw.component.ts:
	Change the global variables of fillForm and strokeForm
	Create functions to return their color stroke and fill
	Do a similar thing as onFontChange
draw-style.service.ts
(Housecleaning: Change the variable for the properties of each features)

* Selection per element for the color works

Bugs:
- When moving the drawing, it resets the color and the font
- When the user edits the label, it bugs the whole website

* Working features

Might change the design of the page

* Partially clean it up

Started playing with the design of the page

* Implemented edition of the position of label

Need to clean the code and work on if it is an icon

* Cleaned up the code

* Added a CSS style for the edition of the draw

* removed unused code

* Initial scrollbar for the table

* Progress in table

* Update entity-table.component.html

* formatted the html

* format ts file

* Fixed some formatting issues

* Redid design of the inputs box

* updated format

* edit the formatting

* Update package-lock.json

* Implemented a possible solution

* Dynamic table height

Uses the length of the store ()

* Update to fit 6 elements of the table

* Cleaned up the code

* Reformatting

* reformating

* reformatting

* Redid the files since next

* UI modifications

* UI and logic changes

* 1.12.0

* Added a popup dialog

* Added the json lines for the layer

* Update draw.component.ts

* Changed the logic

* Still does not retain the info

* working logic with few bugs

* Made an Output and input for DC

* Working prototype

* Cleaning the code

* Update draw.component.ts

* Requested changes

* updateFrontend to getFeature

* Update draw.component.ts

* Fix bugs

* Update draw.component.ts

* formatting

* Added logic to the toggles

* small changes

* initial changes

* Logic working with few bugs

* Working logic

* removed console

* Missing CSS edits

* Working logic with editLabel

* Added vocab and modified UI

* lint.fix

* Changed logic and design

* Updated the logic

* Small design and logic changes

TODO:
Implement the measuring logic:
	measureOlGeometry
Attach it to the Frontend
Create logic for dynamic changes on onModify

* Popup measuring logic done

* UI changes

* measuring logic working

* lint fix

* started the Circle logic

* Working logic for the circle length and area

* Circle logic works

* working logic for coordinates and nicer UI

* small changes

* lint.fix

* UI changes

* final revisions hopefully

* Added small changes

* tests with the buffer

* removed the spacial

* some changes with the UI

* UI changes and final version

* lint

* fix(draw): css minor fix

* feat(draw): Allow area and length label por polygon, get draw label on edit

* fix(draw): keep 5 digits on coord/fix manage checkbox and area translate

* feat(map.utils): add method to round coord and then convert to strinn array

* refactor(draw): use existing method to round coordinates

Co-authored-by: Philippe Lafreniere <[email protected]>
Co-authored-by: Pierre-Étienne Lord <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow add the clicked coordinate as label for point in draw tool
3 participants