Skip to content

Commit

Permalink
fix(HandleWidget): fix cursor representation when there is several wi…
Browse files Browse the repository at this point in the history
…dgets
  • Loading branch information
luciemac committed Jul 12, 2018
1 parent 002e9cd commit 897e727
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Sources/Interaction/Widgets/HandleWidget/index.js
Expand Up @@ -118,19 +118,24 @@ function vtkHandleWidget(publicAPI, model) {

publicAPI.moveAction = (callData) => {
const position = [callData.position.x, callData.position.y];

let state = model.widgetRep.getInteractionState();

if (model.widgetState === WidgetState.START) {
const state = model.widgetRep.getInteractionState();
model.widgetRep.computeInteractionState(position);
setCursor(model.widgetRep.getInteractionState());
state = model.widgetRep.getInteractionState();
setCursor(state);
if (
model.widgetRep.getActiveRepresentation() &&
state !== model.widgetRep.getInteractionState()
) {
publicAPI.render();
}
return VOID;

return state === InteractionState.OUTSIDE ? VOID : EVENT_ABORT;
}

setCursor(state);
model.widgetRep.complexWidgetInteraction(position);
publicAPI.invokeInteractionEvent();
publicAPI.render();
Expand Down

0 comments on commit 897e727

Please sign in to comment.