Skip to content

Commit

Permalink
doc(typo): Fix documentation and comments typos identified using code…
Browse files Browse the repository at this point in the history
…spell
  • Loading branch information
jcfr authored and jourdain committed Feb 24, 2020
1 parent 9cf64ad commit 32897d9
Show file tree
Hide file tree
Showing 68 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion BREAKING_CHANGES.md
Expand Up @@ -2,7 +2,7 @@

This switch focuses on simplifying the interactor observers, and forwarding events data to the callbacks:
- Remove `set/getAnimationState` and `start/stopState` in InteractorStyle. Instead, use `start/stop${stateName}`.
- Remove `CharEvent` whcih was a duplicate of `KeyPressEvent`.
- Remove `CharEvent` which was a duplicate of `KeyPressEvent`.
- Rename `setEnable*(` to `setEnabled()` in AbstractWidget.
- Remove `get2DPointerPosition()` from AbstractWidget: the position will now be properly positioned based on the canvas bounds as soon as it is caught by the Interactor.
- Rename `Pinch` events to `MouseWheel` events when those events are triggered by the mouse wheel, and use the wheel delta instead of a scale.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -33,7 +33,7 @@ Please follow the coding style:
$ git checkout -b new_feature
```

4. Start hacking. Additional informations on how to create classe/test/example can be found
4. Start hacking. Additional information on how to create class/test/example can be found
[here](https://kitware.github.io/vtk-js/docs/) in the __Development__ section.

```sh
Expand Down
2 changes: 1 addition & 1 deletion Documentation/content/docs/develop_build.md
Expand Up @@ -35,4 +35,4 @@ And if you want to skip tests and examples:
$ npm run doc -- -s -f ExampleNameThatDoesNotExist
```

`ExampleNameThatDoesNotExist` can be replaced by multilpe real example names and the doc tool will only build those examples.
`ExampleNameThatDoesNotExist` can be replaced by multiple real example names and the doc tool will only build those examples.
2 changes: 1 addition & 1 deletion Documentation/content/docs/develop_test.md
Expand Up @@ -90,7 +90,7 @@ test.onlyIfWebGL('Test vtkClassName Rendering', (t) => {

## Registering a test

As opposed to examples and api documentation, tests won't be picked up automatically and it is the responsability of the author to register it on the test suite.
As opposed to examples and api documentation, tests won't be picked up automatically and it is the responsibility of the author to register it on the test suite.
_This may change as the project evolves._

To add a test to the suite, you need to import it inside `Sources/tests.js`.
Expand Down
10 changes: 5 additions & 5 deletions Documentation/content/docs/develop_widget.md
Expand Up @@ -16,7 +16,7 @@ A call to `widgetManager.enablePicking()` allows the user to interact with widge

### Widget creation

A widget is created by `vtkWidget.newInstance(INITIAL_VALUES)` where `vtkWidget` is the base class of the widget being created and `INITIAL_VALUES` are the arguments given to the constructor of the widget. Note that some parameters cannot be changed later on. `INITIAL_VALUES` may be the only way to set those parameters. During this call the "widget state" is created. It is unique to a widget instance. This allows for synchronization of the same widget accross renderers (a change of the widget state in one view is directly rendered in all other views).
A widget is created by `vtkWidget.newInstance(INITIAL_VALUES)` where `vtkWidget` is the base class of the widget being created and `INITIAL_VALUES` are the arguments given to the constructor of the widget. Note that some parameters cannot be changed later on. `INITIAL_VALUES` may be the only way to set those parameters. During this call the "widget state" is created. It is unique to a widget instance. This allows for synchronization of the same widget across renderers (a change of the widget state in one view is directly rendered in all other views).

The widget must then be set with `widgetManager.addWidget(widget, viewType)`. The `viewType` parameter informs the widget manager about the representations it should build (see Widget representations). `addWidget()` returns a `handle` to the widget specific to the renderer the widget manager is linked to.

Expand All @@ -28,7 +28,7 @@ Removing a widget from a view is done by `widgetManager.removeWidget(widget)`. R

### Widget state

The widget state stores widget data used accross renderers. The widget state is composed of sub-states(i.e. Object) made of properties that describe particular aspects of the widget. For example, sub-states can store positions and sizes of actors to be rendered.
The widget state stores widget data used across renderers. The widget state is composed of sub-states(i.e. Object) made of properties that describe particular aspects of the widget. For example, sub-states can store positions and sizes of actors to be rendered.
The widget state must be built using `vtkStateBuilder`. There are four ways to build sub-states.

#### Static sub-state
Expand Down Expand Up @@ -177,15 +177,15 @@ The `labels` field determines which sub-states of the widget should be used by t
A representation can have multiple sub-states as input. Different sub-states can be rendered similarly.
Returning different representation parameters for different view types allows for an adapted view depending on the context. For example, having a widget rendered in a 2D view and a 3D view simultaneously with different 2D and 3D widget representations.

Representations are automatically recomputed when sub-states are modified. They are implemented as VTK.js filters since all the rendering computations happen in the `requestData(inData, outData)` method where `inData` is the list of states comming from sub-states and `outData` is a `vtkPolyData` representing the geometry to render.
Representations are automatically recomputed when sub-states are modified. They are implemented as VTK.js filters since all the rendering computations happen in the `requestData(inData, outData)` method where `inData` is the list of states coming from sub-states and `outData` is a `vtkPolyData` representing the geometry to render.

Representations manage their own actors and mappers. Actors are usually created when the representation is created. Actors should be pushed in `model.actors` to be rendered (see vtkRectangleContextRepresentation for a simple example).

A representation should inherit from either `vtkHandleRepresentation` or `vtkContextRepresentation`. The difference between these two base classes is that user can click and interact with handle representations but not with context ones.

### Widget behavior

The widget behavior is the place where the logic of the widget happens. The widget behavior is the handle returned when a widget is added to a widget manager. The widget behavior receives and responds to mouse and keyboard events through handler methods. These methods are named `handle{XXX}(callData)` where `XXX` is the name of the event (like `KeyPress`, `KeyUp`, `MouseMove`, `LeftButtonPress`, etc...) and `callData` is the event data (it contains informations like the mouse position, the keyboard state ...). All events don't need a handler method: if no handler is provided the widget behavior ignores the event. Each handler must return either `macro.EVENT_ABORT` or `macro.VOID`. `macro.EVENT_ABORT` means that the event should not be propagated to other widgets wherehas `macro.VOID` means that the event should be propagated. Note that the order in which widgets receive events is not guaranteed, so returning the wrong value might starve other widgets from events they expect.
The widget behavior is the place where the logic of the widget happens. The widget behavior is the handle returned when a widget is added to a widget manager. The widget behavior receives and responds to mouse and keyboard events through handler methods. These methods are named `handle{XXX}(callData)` where `XXX` is the name of the event (like `KeyPress`, `KeyUp`, `MouseMove`, `LeftButtonPress`, etc...) and `callData` is the event data (it contains information like the mouse position, the keyboard state ...). All events don't need a handler method: if no handler is provided the widget behavior ignores the event. Each handler must return either `macro.EVENT_ABORT` or `macro.VOID`. `macro.EVENT_ABORT` means that the event should not be propagated to other widgets wherehas `macro.VOID` means that the event should be propagated. Note that the order in which widgets receive events is not guaranteed, so returning the wrong value might starve other widgets from events they expect.

The widget behavior has also access to the renderer, openGLRenderWindow and interactor.

Expand All @@ -199,7 +199,7 @@ The `loseFocus()` method is called when the widget manager removes the focus fro

##### Active state

The widget state can have an active sub-state. This is usually useful to flag the handle the user is interacting with and keep track of it or to change its visual appearance. For example, `vtkSphereHandleRepresentation` increases temporarilly the radius of the active handle to emphasize the active handle.
The widget state can have an active sub-state. This is usually useful to flag the handle the user is interacting with and keep track of it or to change its visual appearance. For example, `vtkSphereHandleRepresentation` increases temporarily the radius of the active handle to emphasize the active handle.

The active state can be set by the widget behavior with `subState.activate()`. Similarly a sub-state can be deactivated with a call to `subState.deactivate()`.

Expand Down
2 changes: 1 addition & 1 deletion Documentation/content/docs/misc_contributing.md
Expand Up @@ -33,7 +33,7 @@ Please follow the coding style:
$ git checkout -b new_feature
```

4. Start hacking. Additional informations on how to create classe/test/example can be found
4. Start hacking. Additional information on how to create class/test/example can be found
[here](https://kitware.github.io/vtk-js/docs/) in the __Development__ section.

```sh
Expand Down
2 changes: 1 addition & 1 deletion Documentation/content/docs/misc_tools.md
Expand Up @@ -11,7 +11,7 @@ We rely on Semantic-release to manage our change log, tagging and publishing
to NPM via Travis.

In order to maintain that process each commit message should follow a specific
formatting. To ensure that formating, we use Commitizen which can be triggered
formatting. To ensure that formatting, we use Commitizen which can be triggered
via the following command. Additional information can be found
[here](https://gist.github.com/stephenparish/9941e89d80e2bc58a153).

Expand Down
2 changes: 1 addition & 1 deletion Examples/Applications/SkyboxViewer/index.js
Expand Up @@ -298,7 +298,7 @@ function createVisualization(container, mapReader) {

renderWindow.render();

// handle auto incrmenting position
// handle auto incrementing position
if (autoIncrementTimer !== 0) {
setInterval(nextPosition, autoIncrementTimer * 1000);
}
Expand Down
2 changes: 1 addition & 1 deletion Examples/Volume/VolumeMapperBlendModes/index.js
Expand Up @@ -23,7 +23,7 @@ fullScreenRenderer.addController(controlPanel);
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Examples/Volume/VolumeMapperParallelProjection/index.js
Expand Up @@ -25,7 +25,7 @@ fullScreenRenderer.addController(controlPanel);
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Examples/Volume/ZipHttpReader/index.js
Expand Up @@ -20,7 +20,7 @@ const renderWindow = fullScreenRenderer.getRenderWindow();
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Sources/Common/Core/DataArray/Constants.js
Expand Up @@ -11,7 +11,7 @@ export const DataTypeByteSize = {
};

export const VtkDataTypes = {
VOID: '', // not sure to know what that shoud be
VOID: '', // not sure to know what that should be
CHAR: 'Int8Array',
SIGNED_CHAR: 'Int8Array',
UNSIGNED_CHAR: 'Uint8Array',
Expand Down
2 changes: 1 addition & 1 deletion Sources/Common/DataModel/BoundingBox/api.md
Expand Up @@ -34,7 +34,7 @@ were just initialized.

### addBox(otherInstance)

Change the bouding box to be the union of itself and bbox
Change the bounding box to be the union of itself and bbox

### addBounds(xMin, xMax, yMin, yMax, zMin, zMax)

Expand Down
2 changes: 1 addition & 1 deletion Sources/Common/DataModel/DataSet/api.md
@@ -1,5 +1,5 @@
vtkDataSet is an abstract class that specifies an interface for dataset
objects. vtkDataSet also provides methods to provide informations about
objects. vtkDataSet also provides methods to provide information about
the data, such as center, bounding box, and representative length.

In vtk a dataset consists of a structure (geometry and topology) and
Expand Down
4 changes: 2 additions & 2 deletions Sources/Common/DataModel/ImageData/api.md
Expand Up @@ -35,7 +35,7 @@ You can't directly set the bounds. First you need to decide how many pixels acro
In general, always set the extent to start at zero, e.g. `[0, 9, 0, 9, 0, 9]` for a 10x10x10 image. Calling `setDimensions(10,10,10)` does exactly the same thing as `setExtent(0,9,0,9,0,9)` but you should always do the latter to be explicit about where your extent starts.

### getDirection(), setDirection(array[9]), setDirection(...array)
Direction is a `mat3` matrix corresponding to the axes directions in world coordinates for the I, J, K axes of the image. Direction must form an orthonormal basis. `setDirection` can be called with an array of length 9, or each part provided as individual arugments.
Direction is a `mat3` matrix corresponding to the axes directions in world coordinates for the I, J, K axes of the image. Direction must form an orthonormal basis. `setDirection` can be called with an array of length 9, or each part provided as individual arguments.

### getNumberOfCells()
Standard vtkDataSet API method.
Expand Down Expand Up @@ -87,4 +87,4 @@ Calculates the `indexToWorld` and `worldToIndex` conversion matrices from the or
Returns an `array[3]` of values to multiply an `[i,j,k]` index to convert into the actual data array index, from the provided extent. `numberOfComponents` should match the Scalar components.

### *(internal)* computeOffsetIndex([i, j, k])
Converts an `[i,j,k]` index to the flat data array index. Returns `NaN` if any of the i,j,k bounds are outside the data Extent.
Converts an `[i,j,k]` index to the flat data array index. Returns `NaN` if any of the i,j,k bounds are outside the data Extent.
2 changes: 1 addition & 1 deletion Sources/Filters/General/AppendPolyData/index.js
Expand Up @@ -57,7 +57,7 @@ function vtkAppendPolyData(publicAPI, model) {
let numStrips = 0;
let numPolys = 0;

// Field data is propogated to output only if present in all inputs
// Field data is propagated to output only if present in all inputs
let hasPtNormals = true; // assume present by default
let hasPtTCoords = true;
let hasPtScalars = true;
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/General/ImageCropFilter/example/index.js
Expand Up @@ -49,7 +49,7 @@ function setupControlPanel(data, cropFilter) {
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions Sources/Filters/General/TubeFilter/index.js
Expand Up @@ -59,7 +59,7 @@ function vtkTubeFilter(publicAPI, model) {
for (let i = 0; i < lineData.length; i += npts + 1) {
npts = lineData[i];
if (npts === 1) {
// return arbitary
// return arbitrary
normals.setTuple(lineData[i + 1], normal);
} else if (npts > 1) {
let sNextId = 0;
Expand All @@ -69,7 +69,7 @@ function vtkTubeFilter(publicAPI, model) {
const linePts = lineData.slice(i + 1, i + 1 + npts);
sNextId = findNextValidSegment(pts, linePts, 0);
if (sNextId !== npts) {
// atleast one valid segment
// at least one valid segment
let pt1Id = linePts[sNextId];
let pt1 = pts.slice(3 * pt1Id, 3 * (pt1Id + 1));
let pt2Id = linePts[sNextId + 1];
Expand Down
Expand Up @@ -45,7 +45,7 @@ function vtkWindowedSincPolyDataFilter(publicAPI, model) {

const numPts = inPts.getNumberOfPoints();

// Perform topological analysis. What we're gonna do is build a connectivity
// Perform topological analysis. What we're going to do is build a connectivity
// array of connected vertices. The outcome will be one of three
// classifications for a vertex: VTK_SIMPLE_VERTEX, VTK_FIXED_VERTEX. or
// VTK_EDGE_VERTEX. Simple vertices are smoothed using all connected
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Sources/ConeSource/index.js
Expand Up @@ -61,7 +61,7 @@ function vtkConeSource(publicAPI, model) {
polys[cellLocation++] = i + 2 > model.resolution ? 1 : i + 2;
}

// Apply tranformation to the points coordinates
// Apply transformation to the points coordinates
vtkMatrixBuilder
.buildFromRadian()
.translate(...model.center)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Sources/CylinderSource/index.js
Expand Up @@ -150,7 +150,7 @@ function vtkCylinderSource(publicAPI, model) {
}
}

// Apply tranformation to the points coordinates
// Apply transformation to the points coordinates
vtkMatrixBuilder
.buildFromRadian()
.translate(...model.center)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Filters/Sources/SLICSource/example/index.js
Expand Up @@ -20,7 +20,7 @@ const renderWindow = fullScreenRenderer.getRenderWindow();
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions Sources/IO/Core/HttpDataSetReader/api.md
Expand Up @@ -22,7 +22,7 @@ The vtkHttpDataSetReader is using a custom format that only exist in vtk.js whic

## newInstance({ enableArray = true, fetchGzip = false })

Create a reader instance while enabeling a default behavior regarding the
Create a reader instance while enabling a default behavior regarding the
data array and the way they should be fetched from the server.

The __enableArray__ argument allow you to choose if you want to activate
Expand Down Expand Up @@ -59,7 +59,7 @@ Return the list of available array with their location and if they are enable or

### getBlocks(): { BlockName: { type: 'MultiBlock', enable: true, SubBlockName: { type: 'UnstructuredGrid', enable: true }}}

List the blocks and their state for data loading. Each hierachy have its state.
List the blocks and their state for data loading. Each hierarchy have its state.

```js
{
Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/Core/HttpDataSetReader/example/index.js
Expand Up @@ -16,7 +16,7 @@ const renderWindow = fullScreenRenderer.getRenderWindow();
// ----------------------------------------------------------------------------
// Example code
// ----------------------------------------------------------------------------
// Server is not sending the .gz and whith the compress header
// Server is not sending the .gz and with the compress header
// Need to fetch the true file name and uncompress it locally
// ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion Sources/IO/Core/ImageStream/example/pvw-server.py
Expand Up @@ -4,7 +4,7 @@
$ pvpython -dr .../pvw-server.py --port 1234
Any ParaViewWeb executable script comes with a set of standard arguments that can be overriden if need be::
Any ParaViewWeb executable script comes with a set of standard arguments that can be overridden if need be::
--port 8080
Port number on which the HTTP server will listen.
Expand Down

0 comments on commit 32897d9

Please sign in to comment.