Skip to content

Commit

Permalink
BuildVu 2022.03 (1.15.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonatherton committed Mar 8, 2022
1 parent f995fbb commit 2a7455a
Show file tree
Hide file tree
Showing 9 changed files with 247 additions and 71 deletions.
51 changes: 28 additions & 23 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idrviewer",
"version": "1.14.1",
"version": "1.15.0",
"description": "The IDRViewer is a viewer designed for documents converted using BuildVu",
"keywords": [
"idrsolutions",
Expand Down Expand Up @@ -31,9 +31,9 @@
"devDependencies": {
"grunt": "^1.4.1",
"grunt-cli": "^1.4.3",
"grunt-contrib-jshint": "^3.1.1",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-qunit": "^5.1.1",
"grunt-contrib-uglify": "^5.0.1",
"qunit": "^2.17.2"
"qunit": "^2.18.0"
}
}
4 changes: 4 additions & 0 deletions src/css/idrviewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
background-color: yellow;
}

.highlight.selected {
background-color: orange;
}

/* Presentation Layout */
.layout-presentation .page {
visibility: hidden;
Expand Down
3 changes: 3 additions & 0 deletions src/examples/complete/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Complete UI Changelog
---------------------

2.4.1 (08 Mar 2022)
- Added support for larger thumbnail source dimensions

2.4.0 (25 Jan 2022)
- Improved search snippet appearance (bold search term within snippets)

Expand Down
7 changes: 5 additions & 2 deletions src/examples/complete/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- v2.4.0 -->
<!-- v2.4.1 -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down Expand Up @@ -250,7 +250,7 @@
};

const clickHandler = function (e) {
IDRViewer.goToPage(this.dataset.page);
IDRViewer.selectSearchResult(parseInt(this.dataset.page), parseInt(this.dataset.index));
e.preventDefault();
};

Expand All @@ -273,12 +273,14 @@
const docFrag = document.createDocumentFragment();
for (let i = 0; i < results.length && i < 500; i++) {
const pg = results[i].page;
const index = results[i].index;

const link = document.createElement('a');
link.href = '?page=' + pg;
link.innerHTML = pg + " - " + htmlEncode(results[i].preSnippet) + "<b>" + htmlEncode(results[i].result) + "</b>" + htmlEncode(results[i].postSnippet);
link.className = 'result';
link.dataset.page = pg;
link.dataset.index = index;
link.addEventListener('click', clickHandler);

docFrag.appendChild(link);
Expand Down Expand Up @@ -1042,6 +1044,7 @@
}
.thumbnail img{
max-width: 160px;
max-height: 100%;
border-radius: 5px;
border: 1px solid #bbb;
}
Expand Down
7 changes: 6 additions & 1 deletion src/js/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
IDRViewer Changelog
-------------------

1.14.1 (25 Dec 2022)
1.15.0 (08 Mar 2022)
- Update idrviewer.search.js to support search result selection and improve support for ligatures
- Reduce the minimum zoom level to prevent page overflow on smaller devices
- Update dev dependencies

1.14.1 (25 Jan 2022)
- Fix search result highlighting not working for quotation marks

1.14.0 (14 Dec 2021)
Expand Down
10 changes: 5 additions & 5 deletions src/js/idrviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@
var exports = {},
zoomType = IDR.ZOOM_AUTO,
lastRulePosition,
zoomValues = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 2.5, 3, 3.5, 4],
zoomValues = [0.1, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 2.5, 3, 3.5, 4],
namedZoomValues = [IDR.ZOOM_AUTO, IDR.ZOOM_FITPAGE, IDR.ZOOM_FITHEIGHT, IDR.ZOOM_FITWIDTH, IDR.ZOOM_ACTUALSIZE],
zoomCount = 0,
styleSheet,
Expand Down Expand Up @@ -1161,11 +1161,11 @@

var isMinZoom = false, isMaxZoom = false;

if (zoom >= 4) {
zoom = 4;
if (zoom >= zoomValues[zoomValues.length - 1]) {
zoom = zoomValues[zoomValues.length - 1];
isMaxZoom = true;
} else if (zoom <= 0.25) {
zoom = 0.25;
} else if (zoom <= zoomValues[0]) {
zoom = zoomValues[0];
isMinZoom = true;
}

Expand Down
Loading

0 comments on commit 2a7455a

Please sign in to comment.