Skip to content

Commit c9ab788

Browse files
committed
fix(WidgetRepresentation): edit and apply prettier
1 parent cdd5933 commit c9ab788

File tree

1 file changed

+65
-56
lines changed
  • Sources/Widgets/Representations/WidgetRepresentation

1 file changed

+65
-56
lines changed
Lines changed: 65 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,52 @@
1-
import vtkDataArray from "../../../Common/Core/DataArray";
2-
import vtkPolyData from "../../../Common/DataModel/PolyData";
3-
import { vtkObject } from "../../../interfaces";
4-
import vtkProp from "../../../Rendering/Core/Prop";
1+
import vtkDataArray from '../../../Common/Core/DataArray';
2+
import vtkPolyData from '../../../Common/DataModel/PolyData';
3+
import vtkProp from '../../../Rendering/Core/Prop';
54
export interface IDisplayScaleParams {
6-
dispHeightFactor: number,
7-
cameraPosition: number[],
8-
cameraDir: number[],
9-
isParallel: boolean,
10-
rendererPixelDims: number[],
5+
dispHeightFactor: number;
6+
cameraPosition: number[];
7+
cameraDir: number[];
8+
isParallel: boolean;
9+
rendererPixelDims: number[];
1110
}
1211

1312
export interface IWidgetRepresentationInitialValues {
14-
labels?: Array<any>,
15-
coincidentTopologyParameters?: object,
16-
displayScaleParams?: IDisplayScaleParams,
17-
scaleInPixels?: boolean
13+
labels?: Array<any>;
14+
coincidentTopologyParameters?: object;
15+
displayScaleParams?: IDisplayScaleParams;
16+
scaleInPixels?: boolean;
1817
}
1918

2019
export interface vtkWidgetRepresentation extends vtkProp {
21-
getLabels(): Array<any>;
22-
setLabels(labels: Array<any>): void;
20+
getLabels(): Array<any>;
21+
setLabels(labels: Array<any>): void;
2322

24-
/**
25-
* Gets the coincident topology parameters applied on the actor mappers
26-
*/
27-
getCoincidentTopologyParameters(): object;
28-
/**
29-
* Sets the coincident topology parameters applied on the actor mappers
30-
*/
31-
setCoincidentTopologyParameters(parameters: object): boolean;
23+
/**
24+
* Gets the coincident topology parameters applied on the actor mappers
25+
*/
26+
getCoincidentTopologyParameters(): object;
27+
/**
28+
* Sets the coincident topology parameters applied on the actor mappers
29+
*/
30+
setCoincidentTopologyParameters(parameters: object): boolean;
3231

33-
/**
34-
* Sets the current view and camera scale parameters.
35-
* Called by the WidgetManager.
36-
* @see setScaleInPixels()
37-
*/
38-
setDisplayScaleParams(params: object): boolean;
32+
/**
33+
* Sets the current view and camera scale parameters.
34+
* Called by the WidgetManager.
35+
* @see setScaleInPixels()
36+
*/
37+
setDisplayScaleParams(params: object): boolean;
3938

40-
/**
41-
* Gets wether actors should have a fix size in display coordinates.
42-
* @see setScaleInPixels()
43-
*/
44-
getScaleInPixels(): boolean;
39+
/**
40+
* Gets wether actors should have a fix size in display coordinates.
41+
* @see setScaleInPixels()
42+
*/
43+
getScaleInPixels(): boolean;
4544

46-
/**
47-
* Sets wether actors should have a fix size in display coordinates.
48-
* @see getScaleInPixels()
49-
*/
50-
setScaleInPixels(scale: boolean): boolean;
45+
/**
46+
* Sets wether actors should have a fix size in display coordinates.
47+
* @see getScaleInPixels()
48+
*/
49+
setScaleInPixels(scale: boolean): boolean;
5150
}
5251

5352
/**
@@ -57,27 +56,36 @@ export interface vtkWidgetRepresentation extends vtkProp {
5756
* @param model object on which data structure will be bounds (protected)
5857
* @param {IWidgetRepresentationInitialValues} [initialValues] (default: {})
5958
*/
60-
export function extend(publicAPI: object, model: object, initialValues?: IWidgetRepresentationInitialValues): void;
59+
export function extend(
60+
publicAPI: object,
61+
model: object,
62+
initialValues?: IWidgetRepresentationInitialValues
63+
): void;
6164

6265
/**
6366
* Method use to create a new instance of vtkWidgetRepresentation
6467
* @param {IWidgetRepresentationInitialValues} [initialValues] for pre-setting some of its content
6568
*/
66-
export function newInstance(initialValues?: IWidgetRepresentationInitialValues): vtkWidgetRepresentation;
69+
export function newInstance(
70+
initialValues?: IWidgetRepresentationInitialValues
71+
): vtkWidgetRepresentation;
6772

6873
/**
6974
* Static function to get the pixel size of a 3D point.
7075
* @param {Number[]} worldCoord 3D point in world coordinates
7176
* @param {IDisplayScaleParams} displayScaleParams Display and camera information
7277
*/
73-
export function getPixelWorldHeightAtCoord(worldCoord: number[], displayScaleParams: IDisplayScaleParams): number[];
78+
export function getPixelWorldHeightAtCoord(
79+
worldCoord: number[],
80+
displayScaleParams: IDisplayScaleParams
81+
): number[];
7482

7583
export interface IWidgetPipeline {
76-
source?: object,
77-
filter?: object,
78-
glyph?: object,
79-
mapper: object,
80-
actor: object
84+
source?: object;
85+
filter?: object;
86+
glyph?: object;
87+
mapper: object;
88+
actor: object;
8189
}
8290
/**
8391
* If provided, connects `source` (dataset or filter) to `filter`.
@@ -92,22 +100,23 @@ export function connectPipeline(pipeline: IWidgetPipeline): void;
92100
* Allocate or resize a vtkPoint(name='point'), vtkCellArray (name=
93101
* 'line'|'poly') or vtkDataArray (name=any) and add it to the vtkPolyData.
94102
* If allocated, the array is automatically added to the polydata
95-
* Connects mapper to actor.
96103
* @param {vtkPolyData} polyData The polydata to add array to
97104
* @param {string} name The name of the array to add (special handling for
98105
* 'point', 'line, 'poly')
99106
* @param {Number} numberOfTuples The number of tuples to (re)allocate.
100107
* @param {String} dataType The typed array type name.
101108
* @param {Number} numberOfComponents The number of components of the array.
102109
*/
103-
export function allocateArray(polyData: vtkPolyData,
104-
name: string,
105-
numberOfTuples: number,
106-
dataType?: string,
107-
numberOfComponents?: number): vtkDataArray|null;
110+
export function allocateArray(
111+
polyData: vtkPolyData,
112+
name: string,
113+
numberOfTuples: number,
114+
dataType?: string,
115+
numberOfComponents?: number
116+
): vtkDataArray | null;
108117

109118
export declare const vtkWidgetRepresentation: {
110-
newInstance: typeof newInstance;
111-
extend: typeof extend;
112-
}
119+
newInstance: typeof newInstance;
120+
extend: typeof extend;
121+
};
113122
export default vtkWidgetRepresentation;

0 commit comments

Comments
 (0)