Summary for detect footnotes

This commit is contained in:
Johannes Zillmann 2017-02-15 07:11:26 +01:00
parent 55506576f5
commit a76dac6428
3 changed files with 15 additions and 0 deletions

View File

@ -78,6 +78,7 @@ export default class DebugView extends React.Component {
}
parseResult.content = parseResult.content.filter((elem, i) => pageNr == -1 || i == pageNr);
const summaryComponent = lastTransformation.createSummaryView(parseResult.summary);
const pageComponents = parseResult.content.map(page => lastTransformation.createPageView(page, this.state.modificationsOnly));
const showModificationCheckbox = lastTransformation.showModificationCheckbox();
@ -152,6 +153,7 @@ export default class DebugView extends React.Component {
</tbody>
</table>
<hr/>
{ summaryComponent }
{ pageComponents }
</div>
);

View File

@ -1,3 +1,4 @@
import React from 'react';
import ToPdfViewTransformation from './ToPdfViewTransformation.jsx';
import TextItem from '../TextItem.jsx';
import ParseResult from '../ParseResult.jsx';
@ -11,6 +12,14 @@ export default class DetectFootnotes extends ToPdfViewTransformation {
super("Detect Footnotes");
}
createSummaryView(summary) {
return <div>
Detected
{ ' ' + summary.footnotes + ' ' } footnotes.
</div>;
}
transform(parseResult:ParseResult) {
var nextFooterNumber = 1;

View File

@ -21,6 +21,10 @@ export default class Transformation {
return false;
}
createSummaryView(summary) { // eslint-disable-line no-unused-vars
return null;
}
createPageView(page, modificationsOnly) { // eslint-disable-line no-unused-vars
throw new TypeError("Do not call abstract method foo from child.");
}