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

Allow element hit boxes to be customized #371

Merged
merged 1 commit into from
Jun 25, 2019
Merged

Conversation

barmac
Copy link
Member

@barmac barmac commented Jun 20, 2019

This allows users to take fine-grained control over element hit boxes:

  • provide APIs for creating and clearing hit boxes
  • support three different types of hit-boxes and user interactions:
    • all: react to all pointer events
    • stroke: react to stroke pointer events
    • click-stroke: when click interacting, otherwise
  • hooking into the interactionEvents.createHit and
    interactionEvents.updateHit events to take over hit box creation

@nikku nikku force-pushed the 238-participant-navigation branch from ae5b8af to c15d994 Compare June 21, 2019 07:22
@nikku nikku self-requested a review June 21, 2019 08:37
@nikku

This comment has been minimized.

@barmac barmac force-pushed the 238-participant-navigation branch from c15d994 to 3df63b8 Compare June 21, 2019 12:49
@nikku nikku force-pushed the 238-participant-navigation branch from 3df63b8 to e032eda Compare June 25, 2019 14:04
This allows users to take fine-grained control over element hit boxes:

* provide APIs for creating and clearing hit boxes

* support three different types of hit-boxes and user interactions:

    - all: react to all pointer events
    - stroke: react to stroke pointer events
    - click-stroke: <stroke> when click interacting, <all> otherwise

* hooking into the `interactionEvents.createHit` and
  `interactionEvents.updateHit` events to take over hit box creation
@nikku nikku force-pushed the 238-participant-navigation branch from e032eda to 53c59c9 Compare June 25, 2019 14:09
@nikku nikku added this to the M29 milestone Jun 25, 2019
@nikku
Copy link
Member

nikku commented Jun 25, 2019

I've updated this PR as discussed and provided the ability to create custom hit shapes from within diagram-js. Checkout bpmn-io/bpmn-js@63994d1 for actual usage / impact of this change.

@barmac Could you have a look? I'm happy to approve this PR once I get your O.K.

🇧🇶

@nikku nikku changed the title feat(interaction-events): fire events to create and update hits Allow element hit boxes to be customized Jun 25, 2019
@nikku nikku merged commit 53c59c9 into master Jun 25, 2019
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the 238-participant-navigation branch June 25, 2019 15:56
@barmac
Copy link
Member Author

barmac commented Jun 25, 2019

Thanks @philippfromme for OK 😆

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