Skip to content

Commit

Permalink
fix(PolyDataReader): Apply uniform reader API
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Legacy/PolyDataReader: parse => parseAsText
  • Loading branch information
jourdain committed Feb 7, 2018
1 parent d285399 commit 0d5a5d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Add more consistency in Readers
- parseAsArrayBuffer(ArrayBuffer) or parseAsText(String)
- Affected readers:
- STLReader
- Legacy/PolyDataReader


## From 4.x to 5

Expand Down
6 changes: 3 additions & 3 deletions Sources/IO/Legacy/PolyDataReader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ function vtkPolyDataReader(publicAPI, model) {
// Fetch the actual data arrays
publicAPI.loadData = (option = {}) => {
const promise = fetchData(model.url, option);
promise.then(publicAPI.parse);
promise.then(publicAPI.parseAsText);
return promise;
};

publicAPI.parse = (content) => {
publicAPI.parseAsText = (content) => {
if (!content) {
return;
}
Expand All @@ -63,7 +63,7 @@ function vtkPolyDataReader(publicAPI, model) {
};

publicAPI.requestData = (inData, outData) => {
publicAPI.parse(model.parseData);
publicAPI.parseAsText(model.parseData);
};
}

Expand Down

0 comments on commit 0d5a5d5

Please sign in to comment.