@kitware/vtk.js 21.1.3 → 21.2.1

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.
Files changed (36) hide show
  1. package/Common/Transform/LandmarkTransform.d.ts +1 -1
  2. package/Filters/General/ImageCropFilter.js +3 -4
  3. package/Filters/Sources/Arrow2DSource.d.ts +14 -13
  4. package/Filters/Sources/ArrowSource.d.ts +9 -8
  5. package/Filters/Sources/CircleSource.d.ts +15 -14
  6. package/Filters/Sources/ConeSource.d.ts +18 -17
  7. package/Filters/Sources/CubeSource.d.ts +19 -19
  8. package/Filters/Sources/Cursor3D.d.ts +19 -16
  9. package/Filters/Sources/CylinderSource.d.ts +15 -14
  10. package/Filters/Sources/LineSource.d.ts +1 -1
  11. package/Filters/Sources/PlaneSource.d.ts +29 -28
  12. package/Filters/Sources/PointSource.d.ts +9 -8
  13. package/Filters/Sources/SphereSource.d.ts +9 -8
  14. package/IO/Core/ImageStream/DefaultProtocol.d.ts +25 -0
  15. package/IO/Core/ImageStream/ViewStream.d.ts +256 -0
  16. package/IO/Core/WSLinkClient.d.ts +29 -6
  17. package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +7 -3
  18. package/Rendering/Core/AbstractMapper.js +1 -0
  19. package/Rendering/Core/Light.d.ts +277 -234
  20. package/Rendering/Core/Property.d.ts +43 -43
  21. package/Rendering/Core/Property2D.d.ts +21 -5
  22. package/Rendering/Core/RenderWindowInteractor.js +7 -7
  23. package/Rendering/Core/Volume.d.ts +9 -0
  24. package/Rendering/Misc/RemoteView.d.ts +199 -0
  25. package/Rendering/OpenGL/ImageMapper.js +1 -1
  26. package/Rendering/OpenGL/PolyDataMapper.js +5 -17
  27. package/Rendering/OpenGL/RenderWindow.js +190 -106
  28. package/Rendering/OpenGL/ShaderProgram.js +0 -12
  29. package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createInlineWorkerFactory.js +17 -0
  30. package/_virtual/rollup-plugin-web-worker-loader__helper__funcToSource.js +18 -0
  31. package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +698 -2
  32. package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +274 -2
  33. package/interfaces.d.ts +66 -24
  34. package/package.json +2 -2
  35. package/types.d.ts +4 -1
  36. package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -31
@@ -1,5 +1,6 @@
1
1
  import { vec3 } from 'gl-matrix';
2
2
  import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
3
+ import { Vector3 } from '@kitware/vtk.js/types';
3
4
 
4
5
  /**
5
6
  *
@@ -7,9 +8,9 @@ import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
7
8
  export interface IPlaneSourceInitialValues {
8
9
  xResolution?: number;
9
10
  yResolution?: number;
10
- origin?: number[];
11
- point1?: number[];
12
- point2?: number[];
11
+ origin?: Vector3;
12
+ point1?: Vector3;
13
+ point2?: Vector3;
13
14
  pointType?: string;
14
15
  }
15
16
 
@@ -27,56 +28,56 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
27
28
  * Get the center of the plane.
28
29
  * @default [0, 0, 0]
29
30
  */
30
- getCenter(): number[];
31
+ getCenter(): Vector3;
31
32
 
32
33
  /**
33
34
  * Get the center of the plane.
34
35
  */
35
- getCenterByReference(): number[];
36
+ getCenterByReference(): Vector3;
36
37
 
37
38
  /**
38
39
  * Get the normal of the plane.
39
40
  * @default [0, 0, 1]
40
41
  */
41
- getNormal(): number[];
42
+ getNormal(): Vector3;
42
43
 
43
44
  /**
44
45
  * Get the normal of the plane.
45
46
  */
46
- getNormalByReference(): number[];
47
+ getNormalByReference(): Vector3;
47
48
 
48
49
  /**
49
50
  * Get the origin of the plane, lower-left corner.
50
51
  * @default [0, 0, 0]
51
52
  */
52
- getOrigin(): number[];
53
+ getOrigin(): Vector3;
53
54
 
54
55
  /**
55
56
  * Get the origin of the plane, lower-left corner.
56
57
  */
57
- getOriginByReference(): number[];
58
+ getOriginByReference(): Vector3;
58
59
 
59
60
  /**
60
61
  * Get the x axes of the plane.
61
62
  * @default [1, 0, 0]
62
63
  */
63
- getPoint1(): number[];
64
+ getPoint1(): Vector3;
64
65
 
65
66
  /**
66
67
  * Get the x axes of the plane.
67
68
  */
68
- getPoint1ByReference(): number[];
69
+ getPoint1ByReference(): Vector3;
69
70
 
70
71
  /**
71
72
  * Get the y axes of the plane.
72
73
  * @default [0, 1, 0]
73
74
  */
74
- getPoint2(): number[];
75
+ getPoint2(): Vector3;
75
76
 
76
77
  /**
77
78
  * Get the y axes of the plane.
78
79
  */
79
- getPoint2ByReference(): number[];
80
+ getPoint2ByReference(): Vector3;
80
81
 
81
82
  /**
82
83
  * Get the x resolution of the plane.
@@ -114,15 +115,15 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
114
115
 
115
116
  /**
116
117
  * Set the center of the plane.
117
- * @param {Number[]} center The coordinate of the center point.
118
+ * @param {Vector3} center The coordinate of the center point.
118
119
  */
119
- setCenter(center: number[]): void;
120
+ setCenter(center: Vector3): void;
120
121
 
121
122
  /**
122
123
  * Set the normal of the plane.
123
- * @param {Number[]} normal The normal coordinate.
124
+ * @param {Vector3} normal The normal coordinate.
124
125
  */
125
- setNormal(normal: number[]): boolean;
126
+ setNormal(normal: Vector3): boolean;
126
127
 
127
128
  /**
128
129
  * Set the normal of the plane.
@@ -134,15 +135,15 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
134
135
 
135
136
  /**
136
137
  * Set the normal of the plane.
137
- * @param {Number[]} normal The normal coordinate.
138
+ * @param {Vector3} normal The normal coordinate.
138
139
  */
139
- setNormalFrom(normal: number[]): boolean;
140
+ setNormalFrom(normal: Vector3): boolean;
140
141
 
141
142
  /**
142
143
  * Set the origin of the plane.
143
- * @param {Number[]} origin The coordinate of the origin point.
144
+ * @param {Vector3} origin The coordinate of the origin point.
144
145
  */
145
- setOrigin(origin: number[]): boolean;
146
+ setOrigin(origin: Vector3): boolean;
146
147
 
147
148
  /**
148
149
  * Set the origin of the plane.
@@ -154,9 +155,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
154
155
 
155
156
  /**
156
157
  * Set the origin of the plane.
157
- * @param {Number[]} origin The coordinate of the origin point.
158
+ * @param {Vector3} origin The coordinate of the origin point.
158
159
  */
159
- setOriginFrom(origin: number[]): boolean;
160
+ setOriginFrom(origin: Vector3): boolean;
160
161
 
161
162
  /**
162
163
  * Specify a point defining the first axis of the plane.
@@ -168,9 +169,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
168
169
 
169
170
  /**
170
171
  * Specify a point defining the first axis of the plane.
171
- * @param {Number[]} point1
172
+ * @param {Vector3} point1
172
173
  */
173
- setPoint1(point1: number[]): boolean;
174
+ setPoint1(point1: Vector3): boolean;
174
175
 
175
176
  /**
176
177
  * Specify a point defining the second axis of the plane.
@@ -182,9 +183,9 @@ export interface vtkPlaneSource extends vtkPlaneSourceBase {
182
183
 
183
184
  /**
184
185
  * Specify a point defining the second axis of the plane.
185
- * @param {Number[]} point2
186
+ * @param {Vector3} point2
186
187
  */
187
- setPoint2(point2: number[]): boolean;
188
+ setPoint2(point2: Vector3): boolean;
188
189
 
189
190
  /**
190
191
  * Set the number of facets used to represent the cone.
@@ -234,7 +235,7 @@ export function newInstance(initialValues?: IPlaneSourceInitialValues): vtkPlane
234
235
  *
235
236
  * @example
236
237
  * ```js
237
- * import vtkPlaneSource from 'vtk.js/Sources/Filters/Sources/PlaneSource';
238
+ * import vtkPlaneSource from '@kitware/vtk.js/Filters/Sources/PlaneSource';
238
239
  *
239
240
  * const plane = vtkPlaneSource.newInstance({ xResolution: 10, yResolution: 10 });
240
241
  * const polydata = plane.getOutputData();
@@ -1,11 +1,12 @@
1
1
  import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
2
+ import { Vector3 } from '@kitware/vtk.js/types';
2
3
 
3
4
  /**
4
5
  *
5
6
  */
6
7
  export interface IPointSourceInitialValues {
7
8
  numberOfPoints?: number;
8
- center?: number[];
9
+ center?: Vector3;
9
10
  radius?: number;
10
11
  pointType?: string;
11
12
  }
@@ -24,12 +25,12 @@ export interface vtkPointSource extends vtkPointSourceBase {
24
25
  * Get the center of the plane.
25
26
  * @default [0, 0, 0]
26
27
  */
27
- getCenter(): number[];
28
+ getCenter(): Vector3;
28
29
 
29
30
  /**
30
31
  * Get the center of the plane.
31
32
  */
32
- getCenterByReference(): number[];
33
+ getCenterByReference(): Vector3;
33
34
 
34
35
  /**
35
36
  * Get the number of points to generate.
@@ -60,15 +61,15 @@ export interface vtkPointSource extends vtkPointSourceBase {
60
61
 
61
62
  /**
62
63
  * Set the center of the point cloud.
63
- * @param {Number[]} center The center point's coordinates.
64
+ * @param {Vector3} center The center point's coordinates.
64
65
  */
65
- setCenter(center: number[]): boolean;
66
+ setCenter(center: Vector3): boolean;
66
67
 
67
68
  /**
68
69
  * Set the center of the point cloud.
69
- * @param {Number[]} center The center point's coordinates.
70
+ * @param {Vector3} center The center point's coordinates.
70
71
  */
71
- setCenterFrom(center: number[]): boolean;
72
+ setCenterFrom(center: Vector3): boolean;
72
73
 
73
74
  /**
74
75
  * Set the number of points to generate.
@@ -110,7 +111,7 @@ export function newInstance(initialValues?: IPointSourceInitialValues): vtkPoint
110
111
  *
111
112
  * @example
112
113
  * ```js
113
- * import vtkPointSource from 'vtk.js/Sources/Filters/Sources/PointSource';
114
+ * import vtkPointSource from '@kitware/vtk.js/Filters/Sources/PointSource';
114
115
  *
115
116
  * const point = vtkPointSource.newInstance({ numberOfPoints: 10 });
116
117
  * const polydata = point.getOutputData();
@@ -1,4 +1,5 @@
1
1
  import { vtkAlgorithm, vtkObject } from '@kitware/vtk.js/interfaces';
2
+ import { Vector3 } from '@kitware/vtk.js/types';
2
3
 
3
4
  /**
4
5
  *
@@ -12,7 +13,7 @@ export interface ISphereSourceInitialValues {
12
13
  phiResolution?: number;
13
14
  startPhi?: number;
14
15
  endPhi?: number;
15
- center?: number[];
16
+ center?: Vector3;
16
17
  pointType?: string;
17
18
  }
18
19
 
@@ -30,12 +31,12 @@ export interface vtkSphereSource extends vtkSphereSourceBase {
30
31
  * Get the center of the sphere.
31
32
  * @default [0, 0, 0]
32
33
  */
33
- getCenter(): number[];
34
+ getCenter(): Vector3;
34
35
 
35
36
  /**
36
37
  * Get the center of the sphere.
37
38
  */
38
- getCenterByReference(): number[];
39
+ getCenterByReference(): Vector3;
39
40
 
40
41
 
41
42
  /**
@@ -103,15 +104,15 @@ export interface vtkSphereSource extends vtkSphereSourceBase {
103
104
 
104
105
  /**
105
106
  * Set the center of the sphere.
106
- * @param {Number[]} center The center point's coordinates.
107
+ * @param {Vector3} center The center point's coordinates.
107
108
  */
108
- setCenter(center: number[]): boolean;
109
+ setCenter(center: Vector3): boolean;
109
110
 
110
111
  /**
111
112
  * Set the center of the sphere.
112
- * @param {Number[]} center The center point's coordinates.
113
+ * @param {Vector3} center The center point's coordinates.
113
114
  */
114
- setCenterFrom(center: number[]): boolean;
115
+ setCenterFrom(center: Vector3): boolean;
115
116
 
116
117
  /**
117
118
  * Set the ending latitude angle.
@@ -192,7 +193,7 @@ export function newInstance(initialValues?: ISphereSourceInitialValues): vtkSphe
192
193
  *
193
194
  * @example
194
195
  * ```js
195
- * import vtkSphereSource from 'vtk.js/Sources/Filters/Sources/SphereSource';
196
+ * import vtkSphereSource from '@kitware/vtk.js/Filters/Sources/SphereSource';
196
197
  *
197
198
  * const sphere = vtkSphereSource.newInstance();
198
199
  * const polydata = sphere.getOutputData();
@@ -0,0 +1,25 @@
1
+ import { Size, Vector3 } from '@kitware/vtk.js/types';
2
+
3
+ declare function createMethods(session: any): {
4
+ subscribeToImageStream: (callback: any) => any;
5
+ unsubscribeToImageStream: (subscription: any) => any;
6
+ registerView: (viewId: number) => any;
7
+ unregisterView: (viewId: number) => any;
8
+ enableView: (viewId: number, enabled: boolean) => any;
9
+ render: (options?: {
10
+ size: Size;
11
+ view: number;
12
+ }) => any;
13
+ resetCamera: (view?: number) => any;
14
+ invalidateCache: (viewId: number) => any;
15
+ setQuality: (viewId: number, quality: number, ratio?: number) => any;
16
+ setSize: (viewId: number, width?: number, height?: number) => any;
17
+ setServerAnimationFPS: (fps?: number) => any;
18
+ getServerAnimationFPS: () => number;
19
+ startAnimation: (viewId?: number) => any;
20
+ stopAnimation: (viewId?: number) => any;
21
+ updateCamera: (viewId: number, focalPoint: Vector3, viewUp: Vector3, position: Vector3, forceUpdate?: boolean) => any;
22
+ updateCameraParameters: (viewId?: number, parameters?: {}, forceUpdate?: boolean) => any;
23
+ }
24
+
25
+ export default createMethods;
@@ -0,0 +1,256 @@
1
+ import { vtkObject } from '@kitware/vtk.js/interfaces';
2
+ import { Size } from '@kitware/vtk.js/types';
3
+ import vtkCamera from '@kitware/vtk.js/Rendering/Core/Camera';
4
+ import DefaultProtocol from '@kitware/vtk.js/IO/Core/ImageStream/DefaultProtocol';
5
+ /**
6
+ *
7
+ */
8
+ export interface IViewStreamInitialValues {
9
+ protocol?: typeof DefaultProtocol;
10
+ api?: any;
11
+ cameraUpdateRate?: number;
12
+ decodeImage?: boolean;
13
+ fpsWindowSize?: number;
14
+ interactiveQuality?: number;
15
+ interactiveRatio?: number;
16
+ isAnimating?: boolean;
17
+ mimeType?: string;
18
+ size?: Size;
19
+ stillQuality?: number;
20
+ stillRatio?: number;
21
+ useCameraParameters?: boolean;
22
+ viewId?: string;
23
+ }
24
+
25
+ interface IMetaData {
26
+ size: Size,
27
+ id: string,
28
+ memory: number,
29
+ workTime: number,
30
+ }
31
+
32
+ interface IEvent {
33
+ url: string,
34
+ fps: number[],
35
+ metadata: IMetaData,
36
+ }
37
+
38
+ export interface vtkViewStream extends vtkObject {
39
+ /**
40
+ *
41
+ * @param callback
42
+ */
43
+ onImageReady(callback: () => void): any;
44
+
45
+ /**
46
+ *
47
+ */
48
+ getViewId(): string;
49
+
50
+ /**
51
+ *
52
+ */
53
+ getSize(): Size;
54
+
55
+ /**
56
+ *
57
+ */
58
+ getFps(): number[];
59
+
60
+ /**
61
+ *
62
+ */
63
+ getLastImageEvent(): IEvent;
64
+
65
+ /**
66
+ *
67
+ */
68
+ getCamera(): vtkCamera;
69
+
70
+ /**
71
+ *
72
+ * @param camera
73
+ */
74
+ setCamera(camera: vtkCamera): boolean;
75
+
76
+ /**
77
+ *
78
+ */
79
+ getCameraUpdateRate(): number;
80
+
81
+ /**
82
+ *
83
+ * @param cameraUpdateRate
84
+ */
85
+ setCameraUpdateRate(cameraUpdateRate: number): boolean;
86
+
87
+ /**
88
+ *
89
+ */
90
+ getDecodeImage(): boolean;
91
+
92
+ /**
93
+ *
94
+ * @param decodeImage
95
+ */
96
+ setDecodeImage(decodeImage: boolean): boolean;
97
+
98
+ /**
99
+ *
100
+ */
101
+ getFpsWindowSize(): number;
102
+
103
+ /**
104
+ *
105
+ * @param fpsWindowSize
106
+ */
107
+ setFpsWindowSize(fpsWindowSize: number): boolean;
108
+
109
+ /**
110
+ *
111
+ */
112
+ getInteractiveQuality(): number;
113
+
114
+ /**
115
+ *
116
+ * @param interactiveQuality
117
+ */
118
+ setInteractiveQuality(interactiveQuality: number): boolean;
119
+
120
+ /**
121
+ *
122
+ */
123
+ getInteractiveRatio(): number;
124
+
125
+ /**
126
+ *
127
+ * @param interactiveRatio
128
+ */
129
+ setInteractiveRatio(interactiveRatio: number): boolean;
130
+
131
+ /**
132
+ *
133
+ */
134
+ getStillQuality(): number;
135
+
136
+ /**
137
+ *
138
+ * @param stillQuality
139
+ */
140
+ setStillQuality(stillQuality: number): boolean;
141
+
142
+ /**
143
+ *
144
+ */
145
+ getStillRatio(): number;
146
+
147
+ /**
148
+ *
149
+ * @param stillRatio
150
+ */
151
+ setStillRatio(stillRatio: number): boolean;
152
+
153
+ /**
154
+ *
155
+ */
156
+ getUseCameraParameters(): boolean;
157
+
158
+ /**
159
+ *
160
+ * @param useCameraParameters
161
+ */
162
+ setUseCameraParameters(useCameraParameters: boolean): boolean;
163
+
164
+ /**
165
+ *
166
+ */
167
+ pushCamera(): any;
168
+
169
+ /**
170
+ *
171
+ */
172
+ invalidateCache(): any;
173
+
174
+ /**
175
+ *
176
+ */
177
+ render(): any;
178
+
179
+ /**
180
+ *
181
+ */
182
+ resetCamera(): any;
183
+
184
+ /**
185
+ *
186
+ */
187
+ startAnimation(): any;
188
+
189
+ /**
190
+ *
191
+ */
192
+ stopAnimation(): any;
193
+
194
+ /**
195
+ *
196
+ * @param width
197
+ * @param height
198
+ */
199
+ setSize(width: number, height: number): any;
200
+
201
+ /**
202
+ *
203
+ */
204
+ startInteraction(): any;
205
+
206
+ /**
207
+ *
208
+ */
209
+ endInteraction(): any;
210
+
211
+ /**
212
+ *
213
+ * @param viewId
214
+ */
215
+ setViewId(viewId: string): boolean;
216
+
217
+ /**
218
+ *
219
+ * @param msg
220
+ */
221
+ processMessage(msg: any): void;
222
+
223
+ /**
224
+ *
225
+ */
226
+ delete(): void;
227
+ }
228
+
229
+ /**
230
+ * Method used to decorate a given object (publicAPI+model) with vtkViewStream characteristics.
231
+ * @param publicAPI
232
+ * @param model
233
+ * @param initialValues
234
+ */
235
+ export function extend(
236
+ publicAPI: object,
237
+ model: object,
238
+ initialValues?: IViewStreamInitialValues
239
+ ): void;
240
+
241
+ /**
242
+ * Method used to create a new instance of vtkViewStream
243
+ * @param {IViewStreamInitialValues} [initialValues] for pre-setting some of its content
244
+ */
245
+ export function newInstance(
246
+ initialValues?: IViewStreamInitialValues
247
+ ): vtkViewStream;
248
+
249
+ /**
250
+ * IViewStreamInitialValues provides a way to create a remote view.
251
+ */
252
+ export declare const vtkViewStream: {
253
+ newInstance: typeof newInstance;
254
+ extend: typeof extend;
255
+ };
256
+ export default vtkViewStream;
@@ -15,7 +15,6 @@ import { vtkObject, vtkSubscription } from '@kitware/vtk.js/interfaces';
15
15
  */
16
16
  export function setSmartConnectClass(smartConnectClass: object): void;
17
17
 
18
-
19
18
  export interface vtkWSLinkClient extends vtkObject {
20
19
 
21
20
  /**
@@ -117,21 +116,45 @@ export interface vtkWSLinkClient extends vtkObject {
117
116
  */
118
117
  getConfigDecorator(): (config: object) => object;
119
118
 
120
- getConnection(): object;
121
- getCongig(): object;
119
+ /**
120
+ *
121
+ */
122
+ getConnection(): any;
123
+
124
+ /**
125
+ *
126
+ */
127
+ getConfig(): object;
128
+
129
+ /**
130
+ *
131
+ */
122
132
  getRemote(): object;
133
+
134
+ /**
135
+ *
136
+ */
123
137
  getImageStream(): object;
124
138
 
139
+ /**
140
+ *
141
+ * @param callback
142
+ * @param priority
143
+ */
125
144
  onBusyChange(callback: Function, priority: number): vtkSubscription;
145
+
146
+ /**
147
+ *
148
+ */
126
149
  invokeBusyChange(): void;
127
150
 
128
- onConnectionReady(callback: () => void): vtkSubscription;
151
+ onConnectionReady(callback: (httpReq: any) => void): vtkSubscription;
129
152
  // invokeConnectionReady(): void
130
153
 
131
- onConnectionError(callback: () => void): vtkSubscription;
154
+ onConnectionError(callback: (httpReq: any) => void): vtkSubscription;
132
155
  // invokeConnectionError(): void
133
156
 
134
- onConnectionClose(callback: () => void): vtkSubscription;
157
+ onConnectionClose(callback: (httpReq: any) => void): vtkSubscription;
135
158
  // invokeConnectionClose(): void
136
159
  }
137
160
 
@@ -56,7 +56,9 @@ function vtkMouseBoxSelectionManipulator(publicAPI, model) {
56
56
 
57
57
  var _container$getBoundin = container.getBoundingClientRect(),
58
58
  width = _container$getBoundin.width,
59
- height = _container$getBoundin.height;
59
+ height = _container$getBoundin.height,
60
+ top = _container$getBoundin.top,
61
+ left = _container$getBoundin.left;
60
62
 
61
63
  var _getBounds = getBounds(),
62
64
  _getBounds2 = _slicedToArray(_getBounds, 4),
@@ -65,8 +67,10 @@ function vtkMouseBoxSelectionManipulator(publicAPI, model) {
65
67
  yMin = _getBounds2[2],
66
68
  yMax = _getBounds2[3];
67
69
 
68
- div.style.left = "".concat(width * xMin / viewWidth, "px");
69
- div.style.top = "".concat(height - height * yMax / viewHeight, "px");
70
+ var xShift = left + window.scrollX;
71
+ var yShift = top + window.scrollY;
72
+ div.style.left = "".concat(xShift + width * xMin / viewWidth, "px");
73
+ div.style.top = "".concat(yShift + height - height * yMax / viewHeight, "px");
70
74
  div.style.width = "".concat(width * (xMax - xMin) / viewWidth, "px");
71
75
  div.style.height = "".concat(height * (yMax - yMin) / viewHeight, "px");
72
76
  } //-------------------------------------------------------------------------
@@ -14,6 +14,7 @@ function vtkAbstractMapper(publicAPI, model) {
14
14
  }
15
15
 
16
16
  model.clippingPlanes.push(plane);
17
+ publicAPI.modified();
17
18
  };
18
19
 
19
20
  publicAPI.getNumberOfClippingPlanes = function () {