@kitware/vtk.js 31.0.2 → 31.0.4
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.
package/Rendering/Core/Mapper.js
CHANGED
|
@@ -342,7 +342,7 @@ function vtkMapper(publicAPI, model) {
|
|
|
342
342
|
return true;
|
|
343
343
|
};
|
|
344
344
|
publicAPI.canUseTextureMapForColoring = (scalars, cellFlag) => {
|
|
345
|
-
if (cellFlag) {
|
|
345
|
+
if (cellFlag && !(model.colorMode === ColorMode.DIRECT_SCALARS)) {
|
|
346
346
|
return true; // cell data always use textures.
|
|
347
347
|
}
|
|
348
348
|
|
|
@@ -140,7 +140,7 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
140
140
|
const center = [(bounds[0] + bounds[1]) * 0.5, (bounds[2] + bounds[3]) * 0.5, (bounds[4] + bounds[5]) * 0.5];
|
|
141
141
|
model.widgetState.getMoveHandle().setOrigin(center);
|
|
142
142
|
});
|
|
143
|
-
model.widgetState.getPositionOnLine().onModified(() => {
|
|
143
|
+
let linePosSub = model.widgetState.getPositionOnLine().onModified(() => {
|
|
144
144
|
updateTextPosition(model);
|
|
145
145
|
});
|
|
146
146
|
|
|
@@ -148,6 +148,10 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
148
148
|
publicAPI.setManipulator(model.manipulator || vtkPlanePointManipulator.newInstance({
|
|
149
149
|
useCameraNormal: true
|
|
150
150
|
}));
|
|
151
|
+
publicAPI.delete = macro.chain(publicAPI.delete, () => {
|
|
152
|
+
linePosSub.unsubscribe();
|
|
153
|
+
linePosSub = null;
|
|
154
|
+
});
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
// ----------------------------------------------------------------------------
|