Skip to content

Commit

Permalink
Release 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaiter committed Aug 4, 2020
1 parent 731d504 commit 476c5b5
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion __tests__/components/PageTextDisplay.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import PageTextDisplay from '../../src/components/PageTextDisplay';

import lineFixtures from '../../__fixtures__/lines.json';


/** Helper function to match against an elements inner text */
function svgTextMatcher(text) {
return (content, element) => {
Expand Down
1 change: 0 additions & 1 deletion __tests__/lib/ocrFormats.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const closeTo = (expected, precision = 1) => ({
asymmetricMatch: (actual) => Math.abs(expected - actual) < Math.pow(10, -precision) / 2,
});


describe('parsing ALTO', () => {
const altoMarkup = fs.readFileSync('__fixtures__/alto.xml', 'utf8');
const parsed = parseAlto(altoMarkup, { height: 1925, width: 1248 });
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirador-textoverlay",
"version": "0.3.0pre",
"version": "0.3.0",
"description": "Mirador 3 plugin to render a hidden (but selectable) or visible text overlay",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
1 change: 0 additions & 1 deletion src/components/PageTextDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function runningOnTouchScreen() {
);
}


/** Page Text Display component that is optimized for fast panning/zooming
*
* NOTE: This component is doing stuff that is NOT RECOMMENDED GENERALLY, like
Expand Down
2 changes: 0 additions & 2 deletions src/components/TextOverlaySettingsBubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import useTheme from '@material-ui/core/styles/useTheme';
import { changeAlpha, toHexRgb } from '../lib/color';
import TextSelectIcon from './TextSelectIcon';


/** Container for a settings button */
const ButtonContainer = ({
children, withBorder, paddingLeft, paddingRight,
Expand Down Expand Up @@ -250,7 +249,6 @@ ColorWidget.propTypes = {
).isRequired,
};


/** Control text overlay settings */
const TextOverlaySettingsBubble = ({
windowTextOverlayOptions, imageToolsEnabled, textsAvailable,
Expand Down
5 changes: 0 additions & 5 deletions src/lib/ocrFormats.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function parseHocrAttribs(titleAttrib) {
}, {});
}


/** Parse an hOCR node */
function parseHocrNode(node, endOfLine = false, scaleFactor = 1) {
const [ulx, uly, lrx, lry] = parseHocrAttribs(node.title).bbox.map((dim) => dim * scaleFactor);
Expand Down Expand Up @@ -61,7 +60,6 @@ function parseHocrNode(node, endOfLine = false, scaleFactor = 1) {
return spans;
}


/** Parse an hOCR document */
export function parseHocr(hocrText, referenceSize) {
const doc = parser.parseFromString(hocrText, 'text/html');
Expand Down Expand Up @@ -121,7 +119,6 @@ export function parseHocr(hocrText, referenceSize) {
};
}


/** Create CSS directives from an ALTO TextStyle node */
function altoStyleNodeToCSS(styleNode) {
// NOTE: We don't map super/subscript, since it would change the font size
Expand Down Expand Up @@ -150,7 +147,6 @@ function altoStyleNodeToCSS(styleNode) {
return styles.join(';');
}


/**
* Parse an ALTO document.
*
Expand Down Expand Up @@ -294,7 +290,6 @@ export function parseOcr(ocrText, referenceSize) {
return parse;
}


/** Parse OCR data from IIIF annotations.
*
* Annotations should be pre-filtered so that they all refer to a single canvas/page.
Expand Down

0 comments on commit 476c5b5

Please sign in to comment.