File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Sources/Rendering/Core/AbstractMapper Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,15 @@ export interface vtkAbstractMapper extends vtkAbstractMapperBase {
3535
3636 /**
3737 * Remove all clipping planes.
38+ * @return true if there were planes, false otherwise.
3839 */
39- removeAllClippingPlanes ( ) : void ;
40+ removeAllClippingPlanes ( ) : boolean ;
4041
41- /**
42- * Remove clipping plane.
43- * @param {vtkPlane } plane
44- */
42+ /**
43+ * Remove clipping plane.
44+ * @param {vtkPlane } plane
45+ * @return true if plane existed and therefore is removed, false otherwise.
46+ */
4547 removeClippingPlane ( plane : vtkPlane ) : boolean ;
4648
4749 /**
Original file line number Diff line number Diff line change @@ -25,7 +25,12 @@ function vtkAbstractMapper(publicAPI, model) {
2525 publicAPI . getNumberOfClippingPlanes = ( ) => model . clippingPlanes . length ;
2626
2727 publicAPI . removeAllClippingPlanes = ( ) => {
28+ if ( model . clippingPlanes . length === 0 ) {
29+ return false ;
30+ }
2831 model . clippingPlanes . length = 0 ;
32+ publicAPI . modified ( ) ;
33+ return true ;
2934 } ;
3035
3136 publicAPI . removeClippingPlane = ( clippingPlane ) => {
You can’t perform that action at this time.
0 commit comments