Skip to content

Add nodrag class to Switch component by default - #413

Open
andreas-schultz wants to merge 2 commits into
developfrom
feature/noDragSwitch
Open

Add nodrag class to Switch component by default#413
andreas-schultz wants to merge 2 commits into
developfrom
feature/noDragSwitch

Conversation

@andreas-schultz

Copy link
Copy Markdown
Contributor

No description provided.

}
};

const noDragClass = noDrag ? "nodrag " : "";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why explicitly only nodrag and not also nopan nowheel? THos 3 classes could be imported via preventReactFlowActionsClasses from ReactFlow.tsx, this could also add more context about this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The user interacts via click with the switch, not with the pan or wheel controls. Leaving out nopan and nowheel seem to be reasonable to me, it would be unexpected if the zoom in/out is not working when the pointer is over the switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants