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

Abstract UI components and add tests #143

Merged
merged 5 commits into from
Feb 25, 2019
Merged

Conversation

rexagod
Copy link
Member

@rexagod rexagod commented Feb 18, 2019

Fixes #105, #112. The sequence of keypress in preview below was "CAPS" first and then the "s" key, nothing else was clicked or pressed.

peek 2019-02-19 00-00

  • Abstracted UI components (Rotate and Scale, individual components) and add tests for the same (also for the originally renamed RotateAndScaleHandle.js at test/src/edit/RotateAndScaleHandleSpec.js).
  • The standalone rotate and scale functionalities are now mapped to "CAPS" and "s" key respectively, for better user accessibility, but can be removed (I originally did this to test these features out and decided to go along with it).
  • Also I didn't include these seperately in the toolbar as per @jywarren's suggestions.

@rexagod rexagod changed the title Abstract UI components and add tests (probable breaking change) Abstract UI components and add tests Feb 18, 2019
@rexagod
Copy link
Member Author

rexagod commented Feb 18, 2019

#140 #126

@rexagod
Copy link
Member Author

rexagod commented Feb 18, 2019

/cc @jywarren @publiclab/reviewers

@jywarren
Copy link
Member

Ooh wow! Will review today!

options: {
TYPE: 'rotate',
icon: new L.Icon({
iconUrl:'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI0NTkiIGhlaWdodD0iNDY0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iIj48cmVjdCBpZD0iYmFja2dyb3VuZHJlY3QiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHg9IjAiIHk9IjAiIGZpbGw9Im5vbmUiIHN0cm9rZT0ibm9uZSIgY2xhc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MS4wNTA1NzI0MTUxMjA2NiB6TTQ0NS43MTU3ODE0NTI4MjI3NCw0NTEuMDUwNTcyNDE1MTIwNjYgaC02Mi44NTczNTM3OTQ2Mjg4NjQgdi02Mi43ODAwNTgyNTkwNjM5MSBoNjIuODU3MzUzNzk0NjI4ODY0IFY0NTEuMDUwNTcyNDE1MTIwNjYgek00MDcuNjIwNDE1NTE2Njg0MjYsMzc2LjY4MDM0OTU1NDM4MzQ0IGgtMzYuMTkwNTk3NjM5MzMxNzcgdjMyLjgzODc5OTcwNDc0MTEyIEg4NS43MTQ1NzMzNTYzMTIwMyB2LTMyLjgzODc5OTcwNDc0MTEyIEg0OS41MjM5NzU3MTY5ODAzMiBWODYuOTI2MjM0NTEyNTUwMDIgaDM2LjE5MDU5NzYzOTMzMTc3IFY1MC4yMjQwNDY2MDcyNTExMjUgaDI4Ny42MjAwMTI4MTc4NDcyIHYzNi43MDIxODc5MDUyOTg5IGgzNC4yODU4MjkzNDI1MjQ4MzUgVjM3Ni42ODAzNDk1NTQzODM0NCB6IiBpZD0ic3ZnXzIiIGNsYXNzPSIiIGZpbGw9IiMxYTFhZWIiIGZpbGwtb3BhY2l0eT0iMSIvPjwvZz48L3N2Zz4=',
Copy link
Member

Choose a reason for hiding this comment

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

This is really a fun handle!

image

However, what about one that more specifically shows a scale icon, like:

image

Anyways I am happy to merge this and we can make that change later if we wish to.

@jywarren
Copy link
Member

OK, my apologies I didn't get to review this, as we had the Barnraising event. I just want to say you've been doing some epic work on this project @rexagod !!! Super impressive!

@jywarren jywarren added the ready label Feb 25, 2019
@jywarren
Copy link
Member

Ugh, sorry there was a conflict in /dist/... so I used the GitHub interface to try to resolve it. I'm going to try to do a clean rebase now.

@jywarren jywarren merged commit 15c9094 into publiclab:main Feb 25, 2019
@jywarren
Copy link
Member

Publishing as v0.3.0!

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.

2 participants