diff --git a/src/javascript/components/DebugView.jsx b/src/javascript/components/DebugView.jsx index 078a7f0..2eb8358 100644 --- a/src/javascript/components/DebugView.jsx +++ b/src/javascript/components/DebugView.jsx @@ -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 {
+ { summaryComponent } { pageComponents } ); diff --git a/src/javascript/models/transformations/DetectFootnotes.jsx b/src/javascript/models/transformations/DetectFootnotes.jsx index 09ad080..f8efae3 100644 --- a/src/javascript/models/transformations/DetectFootnotes.jsx +++ b/src/javascript/models/transformations/DetectFootnotes.jsx @@ -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
+ Detected + { ' ' + summary.footnotes + ' ' } footnotes. +
; + } + + transform(parseResult:ParseResult) { var nextFooterNumber = 1; diff --git a/src/javascript/models/transformations/Transformation.jsx b/src/javascript/models/transformations/Transformation.jsx index 89f9a80..31646b3 100644 --- a/src/javascript/models/transformations/Transformation.jsx +++ b/src/javascript/models/transformations/Transformation.jsx @@ -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."); }