File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
Sources/Rendering/Misc/RemoteView Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -187,21 +187,24 @@ function vtkRemoteView(publicAPI, model) {
187
187
// Object factory
188
188
// ----------------------------------------------------------------------------
189
189
190
- const DEFAULT_VALUES = {
191
- viewId : '-1' ,
192
- interactiveQuality : 60 ,
193
- interactiveRatio : 1 / window . devicePixelRatio ,
194
- stillQuality : 100 ,
195
- stillRatio : 1 ,
196
- rpcMouseEvent : 'viewport.mouse.interaction' ,
197
- rpcGestureEvent : null ,
198
- rpcWheelEvent : null ,
199
- } ;
190
+ function defaultValues ( initialValues ) {
191
+ return {
192
+ viewId : '-1' ,
193
+ interactiveQuality : 60 ,
194
+ interactiveRatio : 1 / window . devicePixelRatio ,
195
+ stillQuality : 100 ,
196
+ stillRatio : 1 ,
197
+ rpcMouseEvent : 'viewport.mouse.interaction' ,
198
+ rpcGestureEvent : null ,
199
+ rpcWheelEvent : null ,
200
+ ...initialValues ,
201
+ } ;
202
+ }
200
203
201
204
// ----------------------------------------------------------------------------
202
205
203
206
export function extend ( publicAPI , model , initialValues = { } ) {
204
- Object . assign ( model , DEFAULT_VALUES , initialValues ) ;
207
+ Object . assign ( initialValues , defaultValues ( initialValues ) ) ;
205
208
206
209
macro . obj ( publicAPI , model , initialValues ) ;
207
210
macro . get ( publicAPI , model , [
You can’t perform that action at this time.
0 commit comments