@kitware/vtk.js 25.14.0 → 25.14.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.
|
@@ -129,8 +129,13 @@ function vtkMouseBoxSelectionManipulator(publicAPI, model) {
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
publicAPI.onButtonUp = function (interactor, renderer) {
|
|
132
|
-
if (!previousPosition || !currentPosition) {
|
|
132
|
+
if (!previousPosition || !currentPosition && !model.boxChangeOnClick) {
|
|
133
133
|
return;
|
|
134
|
+
} // needed because of boxChangeOnClick
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
if (!currentPosition) {
|
|
138
|
+
currentPosition = previousPosition;
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
publicAPI.invokeBoxSelectChange({
|
|
@@ -158,6 +163,7 @@ function vtkMouseBoxSelectionManipulator(publicAPI, model) {
|
|
|
158
163
|
function DEFAULT_VALUES(initialValues) {
|
|
159
164
|
return _objectSpread(_objectSpread({
|
|
160
165
|
// container: null,
|
|
166
|
+
boxChangeOnClick: false,
|
|
161
167
|
renderSelection: true
|
|
162
168
|
}, initialValues), {}, {
|
|
163
169
|
selectionStyle: _objectSpread(_objectSpread({}, DEFAULT_STYLE), initialValues.selectionStyle)
|
|
@@ -175,7 +181,7 @@ function extend(publicAPI, model) {
|
|
|
175
181
|
|
|
176
182
|
event(publicAPI, model, 'BoxSelectInput'); // Trigger while dragging
|
|
177
183
|
|
|
178
|
-
setGet(publicAPI, model, ['renderSelection', 'selectionStyle', 'container']); // Object specific methods
|
|
184
|
+
setGet(publicAPI, model, ['renderSelection', 'boxChangeOnClick', 'selectionStyle', 'container']); // Object specific methods
|
|
179
185
|
|
|
180
186
|
vtkMouseBoxSelectionManipulator(publicAPI, model);
|
|
181
187
|
} // ----------------------------------------------------------------------------
|