From 0d5a5d55ff31fd223fed5d0cb472727eb0f46080 Mon Sep 17 00:00:00 2001 From: Sebastien Jourdain Date: Wed, 7 Feb 2018 15:27:09 -0700 Subject: [PATCH] fix(PolyDataReader): Apply uniform reader API BREAKING CHANGE: Legacy/PolyDataReader: parse => parseAsText --- BREAKING_CHANGES.md | 2 ++ Sources/IO/Legacy/PolyDataReader/index.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 8d3b76c075f..10f86f5e3a8 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -24,6 +24,8 @@ Add more consistency in Readers - parseAsArrayBuffer(ArrayBuffer) or parseAsText(String) - Affected readers: - STLReader + - Legacy/PolyDataReader + ## From 4.x to 5 diff --git a/Sources/IO/Legacy/PolyDataReader/index.js b/Sources/IO/Legacy/PolyDataReader/index.js index f8ea05a18f2..b8dc87c2097 100644 --- a/Sources/IO/Legacy/PolyDataReader/index.js +++ b/Sources/IO/Legacy/PolyDataReader/index.js @@ -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; } @@ -63,7 +63,7 @@ function vtkPolyDataReader(publicAPI, model) { }; publicAPI.requestData = (inData, outData) => { - publicAPI.parse(model.parseData); + publicAPI.parseAsText(model.parseData); }; }