Skip to content

Commit 0d5a5d5

Browse files
committed
fix(PolyDataReader): Apply uniform reader API
BREAKING CHANGE: Legacy/PolyDataReader: parse => parseAsText
1 parent d285399 commit 0d5a5d5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

BREAKING_CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Add more consistency in Readers
2424
- parseAsArrayBuffer(ArrayBuffer) or parseAsText(String)
2525
- Affected readers:
2626
- STLReader
27+
- Legacy/PolyDataReader
28+
2729

2830
## From 4.x to 5
2931

Sources/IO/Legacy/PolyDataReader/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ function vtkPolyDataReader(publicAPI, model) {
4242
// Fetch the actual data arrays
4343
publicAPI.loadData = (option = {}) => {
4444
const promise = fetchData(model.url, option);
45-
promise.then(publicAPI.parse);
45+
promise.then(publicAPI.parseAsText);
4646
return promise;
4747
};
4848

49-
publicAPI.parse = (content) => {
49+
publicAPI.parseAsText = (content) => {
5050
if (!content) {
5151
return;
5252
}
@@ -63,7 +63,7 @@ function vtkPolyDataReader(publicAPI, model) {
6363
};
6464

6565
publicAPI.requestData = (inData, outData) => {
66-
publicAPI.parse(model.parseData);
66+
publicAPI.parseAsText(model.parseData);
6767
};
6868
}
6969

0 commit comments

Comments
 (0)