Remove Transformation Suffix from Transformation classes

This commit is contained in:
Johannes Zillmann 2017-01-29 16:05:26 +01:00
parent a72cdc14a1
commit 7dc1de2912
6 changed files with 15 additions and 15 deletions

View File

@ -1,11 +1,11 @@
import { Enum } from 'enumify'; import { Enum } from 'enumify';
import NoOpTransformation from './transformations/NoOpTransformation.jsx'; import NoOp from './transformations/NoOp.jsx';
import RoundCoordinatesTransformation from './transformations/RoundCoordinatesTransformation.jsx'; import RoundCoordinates from './transformations/RoundCoordinates.jsx';
import CombineSameYTransformation from './transformations/CombineSameYTransformation.jsx'; import CombineSameY from './transformations/CombineSameY.jsx';
import RemoveRepetitiveElements from './transformations/RemoveRepetitiveElements.jsx' import RemoveRepetitiveElements from './transformations/RemoveRepetitiveElements.jsx'
import ToTextPagesTransformation from './transformations/ToTextPagesTransformation.jsx'; import ToTextPages from './transformations/ToTextPages.jsx';
import ToSingleTextPageTransformation from './transformations/ToSingleTextPageTransformation.jsx' import ToSingleTextPage from './transformations/ToSingleTextPage.jsx'
// Holds the state of the Application // Holds the state of the Application
export default class AppState { export default class AppState {
@ -16,12 +16,12 @@ export default class AppState {
this.fileBuffer; this.fileBuffer;
this.pdfPages = []; this.pdfPages = [];
this.transformations = [ this.transformations = [
new NoOpTransformation(), new NoOp,
new RoundCoordinatesTransformation(), new RoundCoordinates(),
new CombineSameYTransformation(), new CombineSameY(),
new RemoveRepetitiveElements(), new RemoveRepetitiveElements(),
new ToTextPagesTransformation(), new ToTextPages(),
new ToSingleTextPageTransformation()]; new ToSingleTextPage()];
//bind functions //bind functions
this.render = this.render.bind(this); this.render = this.render.bind(this);

View File

@ -45,7 +45,7 @@ function combineTextItems(textItems:TextItem[]) {
}); });
} }
export default class CombineSameYTransformation extends Transformation { export default class CombineSameY extends Transformation {
constructor() { constructor() {
super("Combine Text On Same Y"); super("Combine Text On Same Y");

View File

@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
import PdfPage from '../PdfPage.jsx'; import PdfPage from '../PdfPage.jsx';
import ContentView from '../ContentView.jsx'; import ContentView from '../ContentView.jsx';
export default class NoOpTransformation extends Transformation { export default class NoOp extends Transformation {
constructor() { constructor() {
super("Original"); super("Original");

View File

@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
import PdfPage from '../PdfPage.jsx'; import PdfPage from '../PdfPage.jsx';
import ContentView from '../ContentView.jsx'; import ContentView from '../ContentView.jsx';
export default class RoundCoordinatesTransformation extends Transformation { export default class RoundCoordinates extends Transformation {
constructor() { constructor() {
super("Round Coordinates"); super("Round Coordinates");

View File

@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
import TextPage from '../TextPage.jsx'; import TextPage from '../TextPage.jsx';
import ContentView from '../ContentView.jsx'; import ContentView from '../ContentView.jsx';
export default class ToSingleTextPageTransformation extends Transformation { export default class ToSingleTextPage extends Transformation {
constructor() { constructor() {
super("To Single Text Page"); super("To Single Text Page");

View File

@ -3,7 +3,7 @@ import PdfPage from '../PdfPage.jsx';
import TextPage from '../TextPage.jsx'; import TextPage from '../TextPage.jsx';
import ContentView from '../ContentView.jsx'; import ContentView from '../ContentView.jsx';
export default class ToTextPagesTransformation extends Transformation { export default class ToTextPages extends Transformation {
constructor() { constructor() {
super("To Text Pages"); super("To Text Pages");