Skip to content

DM-8542 Add support for changing draw layer symbol and the size #255

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

Merged
merged 3 commits into from
Dec 16, 2016

Conversation

cwang2016
Copy link
Contributor

The development mainly adds support for the user to change the symbol and its size when overlaying a catalog on an image including the features:

  • catalog default symbol is square and size 3 to 20, size means the size shown on UI.
  • add shape options for the symbol,
    x, square, cross, diamond, circle, arrow, boxcircle, and dot.
  • create a dialog for changing the symbol and its size, each drawing layer has its own dialog.
  • the change in color will update symbol content in symbol dialog and drawing layer panel in real time.
  • the change in symbol, size, and color will update the catalog symbol overlaying the image in real time.

@robyww robyww self-requested a review December 16, 2016 06:02
@robyww robyww assigned robyww and cwang2016 and unassigned robyww Dec 16, 2016
Copy link
Contributor

@robyww robyww left a comment

Choose a reason for hiding this comment

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

Code looks good. The main part of my comments to is put the color utility routines you made into Color.js.

I did notice some react warnings (setState related) for ShapePickerWrapper

"violet":"#ee82ee",
"wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5",
"yellow":"#ffff00","yellowgreen":"#9acd32"};

Copy link
Contributor

Choose a reason for hiding this comment

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

are this colors for you background algorithm? You might want to clean it up so it uses single quotes and the keys are not quoted.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand more this is a named color map to RGB. I think you want to this objects and the background utility routines to util/Color.js.

let a = hsv.value * (1.0 - hsv.saturation);
let b = hsv.value * (1.0 - hsv.saturation * f);
let c = hsv.value * (1.0 - hsv.saturation * (1-f));
let d = hsv.value;
Copy link
Contributor

Choose a reason for hiding this comment

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

you could use const for these instead of let

@ejoliet
Copy link
Contributor

ejoliet commented Dec 16, 2016

Yay!! Great extra feature for catalogs use on images. I think the options are clear enough and the fact that the change is applied immediately is also a extra bonus for usability. I like it a lot. Good job!

…-change the symbol dialog to be only one as color dialog. -update drawlayer in color dialog
@cwang2016
Copy link
Contributor Author

Some update:

  • only one symbol dialog is rendered on the selected symbol on the draw layer panel.
  • move color related routines to Color.js

@cwang2016 cwang2016 merged commit de73aef into dev Dec 16, 2016
@cwang2016 cwang2016 deleted the DM-8542-DLSymbolSize branch December 16, 2016 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants