fix(touch): For viewport interactions use onPointerDown. (#4572)
This commit is contained in:
parent
ee9593a7e0
commit
6160718fd2
@ -18,12 +18,7 @@ describe('OHIF Double Click', () => {
|
|||||||
|
|
||||||
// For whatever reason, with Cypress tests, we have to activate the
|
// For whatever reason, with Cypress tests, we have to activate the
|
||||||
// viewport we are double clicking first.
|
// viewport we are double clicking first.
|
||||||
cy.get('[data-cy="viewport-pane"]')
|
cy.get('[data-cy="viewport-pane"]').eq(i).trigger('click', 'center', {
|
||||||
.eq(i)
|
|
||||||
.trigger('mousedown', 'center', {
|
|
||||||
force: true,
|
|
||||||
})
|
|
||||||
.trigger('mouseup', 'center', {
|
|
||||||
force: true,
|
force: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,9 @@ function ViewportPane({
|
|||||||
// onInteractionHandler...
|
// onInteractionHandler...
|
||||||
// https://reactjs.org/docs/events.html#mouse-events
|
// https://reactjs.org/docs/events.html#mouse-events
|
||||||
// https://stackoverflow.com/questions/8378243/catch-scrolling-event-on-overflowhidden-element
|
// https://stackoverflow.com/questions/8378243/catch-scrolling-event-on-overflowhidden-element
|
||||||
onMouseDown={onInteractionHandler}
|
// Use onPointerDown so that for the config property activateViewportBeforeInteraction===false,
|
||||||
|
// a touch drag will activate the viewport as well as apply the tool selected.
|
||||||
|
onPointerDown={onInteractionHandler}
|
||||||
onDoubleClick={onDoubleClick}
|
onDoubleClick={onDoubleClick}
|
||||||
onClick={onInteractionHandler}
|
onClick={onInteractionHandler}
|
||||||
onScroll={onInteractionHandler}
|
onScroll={onInteractionHandler}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user