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: bitmasking first pass #2301

Merged
merged 13 commits into from
Nov 24, 2023
Merged

feat: bitmasking first pass #2301

merged 13 commits into from
Nov 24, 2023

Conversation

shawnyama
Copy link
Contributor

@shawnyama shawnyama commented Nov 23, 2023

Description

Using bitmasking to read the interaction state of the operator. For this first pass I assigninteractionStatus to hover and drag states when appropriate. I turn on the .focus class when the node is being dragged.

@shawnyama shawnyama linked an issue Nov 23, 2023 that may be closed by this pull request
@mwdchang
Copy link
Member

The way you had written utils/bitmask.ts is a mixture of domain logic (e.g. found, not found) and generic logic (e.g. bitwise-or, bitwise-and). So I am tempted to say just throw it into services folder as you can't really just take it and dump into a different project.

Copy link
Member

@YohannParis YohannParis left a comment

Choose a reason for hiding this comment

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

thank you, those functions really makes the code easier to read.

packages/client/hmi-client/src/utils/bitmask.ts Outdated Show resolved Hide resolved
packages/client/hmi-client/src/utils/bitmask.ts Outdated Show resolved Hide resolved
packages/client/hmi-client/src/utils/bitmask.ts Outdated Show resolved Hide resolved
@shawnyama shawnyama merged commit f6f3a47 into main Nov 24, 2023
5 checks passed
@shawnyama shawnyama deleted the bitmask-header branch November 24, 2023 21:35
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.

Assess using bitmasking to represent non-mutually exclusive states
3 participants