Skip to content

Commit

Permalink
fix errors with grid
Browse files Browse the repository at this point in the history
  • Loading branch information
thejohnhoffer committed Apr 8, 2021
1 parent ac8383a commit f37f3ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/bundle.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const arrange_images = function(viewer, tileSources, hashstate, init) {
const imageName = hashstate.el.getElementsByClassName('minerva-imageName')[0];
imageName.innerText = images.length == 1
? images[0].Description
: exhibit.Name
: hashstate.exhibit.Name

// Read the grid arangement from the configuration file
const numRows = grid.length;
Expand Down Expand Up @@ -3043,7 +3043,10 @@ const build_page_with_exhibit = function(exhibit, options) {
const tileSources = {};
const osd = new RenderOSD(hashstate, viewer, tileSources, eventHandler);
const render = new Render(hashstate, osd, eventHandler);
const init = render.init.bind(render);
const init = () => {
osd.init.call(osd);
render.init.call(render);
}

arrange_images(viewer, tileSources, hashstate, init);
}
Expand Down Expand Up @@ -3073,6 +3076,7 @@ export const build_page = function(options) {
// fill the main div with content
const el = document.getElementById(options.id);
el.innerHTML = exhibitHTML;
const home_el = el.getElementsByClassName('minerva-home-button')[0];
const osd_el = el.getElementsByClassName('minerva-openseadragon')[0];
const zoom_out_el = el.getElementsByClassName('minerva-zoom-out')[0];
const zoom_in_el = el.getElementsByClassName('minerva-zoom-in')[0];
Expand Down
2 changes: 0 additions & 2 deletions osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export const RenderOSD = function(hashstate, viewer, tileSources, eventHandler)
this.mouseEvent = {};
this.trackers = [];
this.eventHandler = eventHandler;

this.init();
}

RenderOSD.prototype = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build": "webpack --mode production"
},
"name": "minerva-browser",
"version": "2.13.0",
"version": "2.13.1",
"description": "A storytelling interface atop openseadragon",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit f37f3ff

Please sign in to comment.