Skip to content

Commit d1514dc

Browse files
committed
fix(ImageDataOutlineFilter): fix function call forwarding thru MTime override
1 parent 1b1e756 commit d1514dc

File tree

1 file changed

+11
-10
lines changed
  • Sources/Filters/General/ImageDataOutlineFilter

1 file changed

+11
-10
lines changed

Sources/Filters/General/ImageDataOutlineFilter/index.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,20 @@ function vtkImageDataOutlineFilter(publicAPI, model) {
3636
outData[0] = model._cubeSource.getOutputData();
3737
};
3838

39-
// Forward calls for [set/get]Generate[Faces/Lines] functions to cubeSource:
40-
publicAPI.setGenerateFaces = (generateFaces) => {
41-
if (model._cubeSource.setGenerateFaces(generateFaces)) {
42-
publicAPI.modified();
43-
}
44-
};
39+
// Capture "parentClass" api for internal use
40+
const superClass = { ...publicAPI };
4541

46-
publicAPI.setGenerateLines = (generateLines) => {
47-
if (model._cubeSource.setGenerateLines(generateLines)) {
48-
publicAPI.modified();
49-
}
42+
publicAPI.getMTime = () => {
43+
let mTime = superClass.getMTime();
44+
mTime = Math.max(mTime, model._cubeSource.getMTime());
45+
return mTime;
5046
};
5147

48+
// Forward calls for [set/get]Generate[Faces/Lines] functions to cubeSource:
49+
publicAPI.setGenerateFaces = model._cubeSource.setGenerateFaces;
50+
51+
publicAPI.setGenerateLines = model._cubeSource.setGenerateLines;
52+
5253
publicAPI.getGenerateFaces = model._cubeSource.getGenerateFaces;
5354

5455
publicAPI.getGenerateLines = model._cubeSource.getGenerateLines;

0 commit comments

Comments
 (0)