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

Change cursor when allowResize and allowDrag are false #1124

Merged
merged 5 commits into from
Sep 26, 2018

Conversation

erick2014
Copy link
Contributor

@erick2014 erick2014 commented Sep 23, 2018

This fixes VictoryBrushContainer should not show "rezise-cursor" when allowResize property is false, #1095

@boygirl
Copy link
Contributor

boygirl commented Sep 24, 2018

@erick2014 thanks for helping out! There are a couple issues with this, though. I'm including a gif to illustrate what I'm talking about:

cursor-issues

  1. switching to cursor: "pointer" looks strange. I think cursor: "auto" is the appropriate value when no resize / move interactions are possible

  2. cursor: "ns-resize" still shows up. I think you need to alter yProps the same way you've altered xProps

Copy link
Contributor

@boygirl boygirl left a comment

Choose a reason for hiding this comment

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

Please address PR comments


if (!props.allowResize && props.allowDrag) {
xProps = assign(xProps, { cursor: "move" });
yProps = assign(yProps, { cursor: "auto" });
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these both be "move" ?

@erick2014
Copy link
Contributor Author

@boygirl thx for your help, check it now

};
if (!props.allowResize && props.allowDrag) {
cursors.xProps = "move";
cursors.yProps = "auto";
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think these should both be "move". If you disagree can you explain why not?

Copy link
Contributor Author

@erick2014 erick2014 Sep 26, 2018

Choose a reason for hiding this comment

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

yeah, I agree, because if you can't resize, but you can drag, makes sense

@boygirl
Copy link
Contributor

boygirl commented Sep 26, 2018

🎉 Merging now!

@boygirl boygirl merged commit e960f09 into FormidableLabs:master Sep 26, 2018
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.

2 participants