Skip to content

Commit

Permalink
More updates to charts
Browse files Browse the repository at this point in the history
  • Loading branch information
mwenge committed Sep 7, 2020
1 parent 495acc6 commit c10ed9b
Show file tree
Hide file tree
Showing 15 changed files with 624 additions and 647 deletions.
1,223 changes: 588 additions & 635 deletions LinearBInscriptions.js

Large diffs are not rendered by default.

Binary file modified charts/.charts.js.swp
Binary file not shown.
5 changes: 4 additions & 1 deletion charts/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ function addLetterImagesToChart(img, image, inscription, container) {
var area = imageCoords[i].coords;
var word = letters[i];

if (area.width < 10) {
continue;
}
if (word == "—" || word == '') {
continue;
}
Expand All @@ -230,7 +233,7 @@ function addLetterImagesToChart(img, image, inscription, container) {

var label = document.createElement("div");
label.className = "concordance-container-label";
label.textContent = word + " in the Cretan Hieroglyphs corpus";
label.textContent = word + " in the Linear B corpus";
d1.appendChild(label);

var filterItem = document.createElement("div");
Expand Down
8 changes: 4 additions & 4 deletions dictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ var dictionary = new Map([
[":M", ""],
[";1", ""],
[";1+TE", ""],
["A", ""],
["A", "A"],
["A2", ""],
["A3", ""],
["AES", "bronze"],
Expand Down Expand Up @@ -1052,9 +1052,9 @@ var dictionary = new Map([
["OVIS:M", "ram"],
["OVIS:X", "sheep"],
["P", "weight subunit 3"],
["PA", ""],
["PA", "PA"],
["PE", ""],
["PO", ""],
["PO", "PO"],
["PUG", "pugio"],
["PYC", "cyperus"],
["PYC+KU", ""],
Expand Down Expand Up @@ -1119,7 +1119,7 @@ var dictionary = new Map([
["TUN+QE", ""],
["TUN+RI", ""],
["TU±RO2", ""],
["U", ""],
["U", "U"],
["V", "measure subunit 2"],
["VIN", "wine"],
["VIR", "man"],
Expand Down
22 changes: 15 additions & 7 deletions explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1740,16 +1740,24 @@ function searchForWord(evt, name, index) {
searchBox.dispatchEvent(new InputEvent("input"));
}

function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
function shuffleImagesToFront(array) {

function shuffle(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
const hasImage = function(x) { return inscriptions.get(x).facsimileImages.length > 0; }
let a1 = shuffle(array.filter((v, i, a) => hasImage(v)));
a1 = a1.concat(shuffle(array.filter((v, i, a) => !hasImage(v))));

return a1;
}

// Shuffle the inscriptions so we display a different group at the top every time
var inscriptionsToLoad = shuffleArray(Array.from(inscriptions.keys()))[Symbol.iterator]();
var inscriptionsToLoad = shuffleImagesToFront(Array.from(inscriptions.keys()))[Symbol.iterator]();
// create config object: rootMargin and threshold
// are two properties exposed by the interface
const config = {
Expand Down
13 changes: 13 additions & 0 deletions imagemaps.js

Large diffs are not rendered by default.

Binary file modified images/facsimiles/Kn493.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn494.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn495.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn496.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn497.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn498.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn499.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/facsimiles/Kn652.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/photos/Kn8.jpg
Binary file not shown.

0 comments on commit c10ed9b

Please sign in to comment.