@kitware/vtk.js 29.7.0 → 29.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,7 +102,9 @@ function extend(publicAPI, model) {
|
|
|
102
102
|
vtkProp.extend(publicAPI, model, initialValues);
|
|
103
103
|
vtkInteractorObserver.extend(publicAPI, model, initialValues);
|
|
104
104
|
macro.setGet(publicAPI, model, ['contextVisibility', 'handleVisibility', '_widgetManager']);
|
|
105
|
-
macro.get(publicAPI, model, ['representations', 'widgetState', 'activeState'
|
|
105
|
+
macro.get(publicAPI, model, ['representations', 'widgetState', 'activeState' // stores the last activated sub state(handle)
|
|
106
|
+
]);
|
|
107
|
+
|
|
106
108
|
macro.moveToProtected(publicAPI, model, ['widgetManager']);
|
|
107
109
|
macro.event(publicAPI, model, 'ActivateHandle');
|
|
108
110
|
vtkAbstractWidget(publicAPI, model);
|
|
@@ -164,7 +164,9 @@ function widgetBehavior(publicAPI, model) {
|
|
|
164
164
|
const step = calldata.spinY;
|
|
165
165
|
isScrolling = true;
|
|
166
166
|
publicAPI.translateCenterOnPlaneDirection(step);
|
|
167
|
-
publicAPI.invokeInternalInteractionEvent(
|
|
167
|
+
publicAPI.invokeInternalInteractionEvent(
|
|
168
|
+
// Force interaction mode because mouse cursor could be above rotation handle
|
|
169
|
+
InteractionMethodsName.TranslateCenter);
|
|
168
170
|
isScrolling = false;
|
|
169
171
|
return macro.EVENT_ABORT;
|
|
170
172
|
};
|
|
@@ -183,14 +185,15 @@ function widgetBehavior(publicAPI, model) {
|
|
|
183
185
|
};
|
|
184
186
|
publicAPI.handleEvent = callData => {
|
|
185
187
|
if (model.activeState.getActive()) {
|
|
186
|
-
publicAPI
|
|
187
|
-
publicAPI
|
|
188
|
+
const methodName = publicAPI.getActiveInteraction();
|
|
189
|
+
publicAPI[methodName](callData);
|
|
190
|
+
publicAPI.invokeInternalInteractionEvent(methodName);
|
|
188
191
|
return macro.EVENT_ABORT;
|
|
189
192
|
}
|
|
190
193
|
return macro.VOID;
|
|
191
194
|
};
|
|
192
|
-
publicAPI.invokeInternalInteractionEvent = ()
|
|
193
|
-
|
|
195
|
+
publicAPI.invokeInternalInteractionEvent = function () {
|
|
196
|
+
let methodName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : publicAPI.getActiveInteraction();
|
|
194
197
|
const computeFocalPointOffset = methodName !== InteractionMethodsName.RotateLine;
|
|
195
198
|
const canUpdateFocalPoint = methodName === InteractionMethodsName.RotateLine;
|
|
196
199
|
publicAPI.invokeInteractionEvent({
|