File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
Common/DataModel/SelectionNode
Rendering/Core/AbstractMapper Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1
1
import macro from 'vtk.js/Sources/macros' ;
2
2
import Constants from 'vtk.js/Sources/Common/DataModel/SelectionNode/Constants' ;
3
3
4
+ // ----------------------------------------------------------------------------
5
+ // vtkSelectionNode methods
6
+ // ----------------------------------------------------------------------------
7
+
8
+ function vtkSelectionNode ( publicAPI , model ) {
9
+ // Set our className
10
+ model . classHierarchy . push ( 'vtkSelectionNode' ) ;
11
+
12
+ publicAPI . getBounds = ( ) => model . points . getBounds ( ) ;
13
+ }
14
+
4
15
// ----------------------------------------------------------------------------
5
16
// Object factory
6
17
// ----------------------------------------------------------------------------
@@ -14,17 +25,6 @@ function defaultValues(initialValues) {
14
25
} ;
15
26
}
16
27
17
- // ----------------------------------------------------------------------------
18
- // vtkSelectionNode methods
19
- // ----------------------------------------------------------------------------
20
-
21
- function vtkSelectionNode ( publicAPI , model ) {
22
- // Set our className
23
- model . classHierarchy . push ( 'vtkSelectionNode' ) ;
24
-
25
- publicAPI . getBounds = ( ) => model . points . getBounds ( ) ;
26
- }
27
-
28
28
// ----------------------------------------------------------------------------
29
29
30
30
export function extend ( publicAPI , model , initialValues = { } ) {
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ function vtkAbstractMapper(publicAPI, model) {
22
22
return false ;
23
23
} ;
24
24
25
- publicAPI . getNumberOfClippingPlanes = ( ) =>
26
- model . clippingPlanes ? model . clippingPlanes . length : 0 ;
25
+ publicAPI . getNumberOfClippingPlanes = ( ) => model . clippingPlanes . length ;
27
26
28
27
publicAPI . removeAllClippingPlanes = ( ) => {
29
28
model . clippingPlanes . length = 0 ;
@@ -42,7 +41,8 @@ function vtkAbstractMapper(publicAPI, model) {
42
41
publicAPI . getClippingPlanes = ( ) => model . clippingPlanes ;
43
42
44
43
publicAPI . setClippingPlanes = ( planes ) => {
45
- if ( ! planes || planes . length === 0 ) {
44
+ // Instanciation time
45
+ if ( model . clippingPlanes === undefined ) {
46
46
model . clippingPlanes = [ ] ;
47
47
return ;
48
48
}
You can’t perform that action at this time.
0 commit comments