Skip to content

Commit 4691eea

Browse files
PaulHaxfloryst
authored andcommitted
fix(CoincidentTopologyHelper): add no op modified function
because publicAPI.modifed is called by macros.js object setter macro. Avoid error calling functions like vtkMapper.setResolveCoincidentTopologyPolygonOffsetParameters
1 parent b425c0c commit 4691eea

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Sources/Rendering/Core/Mapper/CoincidentTopologyHelper.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ const staticOffsetModel = {
2929
Line: { factor: 1, offset: -1 },
3030
Point: { factor: 0, offset: -2 },
3131
};
32-
const staticOffsetAPI = {};
32+
const noOp = () => undefined;
33+
const staticOffsetAPI = {
34+
modified: noOp,
35+
};
3336

3437
addCoincidentTopologyMethods(
3538
staticOffsetAPI,
@@ -58,9 +61,11 @@ function implementCoincidentTopologyMethods(publicAPI, model) {
5861
Object.keys(otherStaticMethods).forEach((methodName) => {
5962
publicAPI[methodName] = otherStaticMethods[methodName];
6063
});
61-
Object.keys(staticOffsetAPI).forEach((methodName) => {
62-
publicAPI[methodName] = staticOffsetAPI[methodName];
63-
});
64+
Object.keys(staticOffsetAPI)
65+
.filter((methodName) => methodName !== 'modified') // don't override instance's modified
66+
.forEach((methodName) => {
67+
publicAPI[methodName] = staticOffsetAPI[methodName];
68+
});
6469

6570
addCoincidentTopologyMethods(
6671
publicAPI,

0 commit comments

Comments
 (0)