Skip to content

Commit

Permalink
improved hiding of home button
Browse files Browse the repository at this point in the history
  • Loading branch information
thejohnhoffer committed Oct 29, 2021
1 parent 55ae79c commit fdd1f9c
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build/bundle.js

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions build/bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

/*!
* Bootstrap-select v1.13.18 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2020 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
*/

/*!
* Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-03-14
*/

/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/

/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/

/*!
* jQuery JavaScript Library v3.5.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2020-05-04T22:49Z
*/

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! showdown v 1.9.1 - 02-11-2019 */

/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

//! Built on 2020-03-05

//! Git commit: v2.4.2-0-c450749

//! License: http://openseadragon.github.io/license/

//! http://openseadragon.github.io

//! openseadragon 2.4.2
4 changes: 1 addition & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3123,9 +3123,7 @@ export const build_page = function(options) {
if (options.homeUrl != undefined) {
home_el.href = options.homeUrl;
}
else if (options.homeUrl === false){
home_el.className = 'd-none';
}
options.noHome = options.noHome || (options.homeUrl === false);
osd_el.id = options.id + '-openseadragon';
zoom_out_el.id = options.id + '-zoom-out';
zoom_in_el.id = options.id + '-zoom-in';
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.7",
"babel-loader": "^8.2.2",
"webpack": "^5.44.0",
"webpack-cli": "^4.7.2"
"webpack": "^5.61.0",
"webpack-cli": "^4.9.1"
},
"scripts": {
"develop": "webpack --mode development",
"build": "webpack --mode production"
},
"name": "minerva-browser",
"version": "3.2.1",
"version": "3.2.2",
"description": "A storytelling interface atop openseadragon",
"main": "index.js",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion render.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,13 @@ Render.prototype = {

// Based on control keys
const edit = HS.edit;
const noHome = HS.noHome;
const drawing = HS.drawing;
const drawType = HS.drawType;
const prefix = '#' + HS.id + ' ';

// Enable home button if in outline mode, otherwise enable table of contents button
displayOrNot(prefix+'.minerva-home-button', !edit && HS.waypoint.Mode == 'outline');
displayOrNot(prefix+'.minerva-home-button', !noHome && !edit && HS.waypoint.Mode == 'outline');
displayOrNot(prefix+'.minerva-toc-button', !edit && HS.waypoint.Mode != 'outline');
// Enable 3D UI if in 3D mode
displayOrNot(prefix+'.minerva-channel-groups-legend', !HS.design.is3d);
Expand Down
3 changes: 2 additions & 1 deletion state.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export const HashState = function(exhibit, options) {
this.customPushState = options.customPushState || false;
this.customWelcome = options.customWelcome || "";
this.hideWelcome = options.hideWelcome || false;
this.noHome = options.noHome || false;

this.state = {
buffer: {
Expand All @@ -211,7 +212,7 @@ export const HashState = function(exhibit, options) {
p: [],
name: '',
description: '',
edit: false,
edit: false,
drawing: 0
};

Expand Down

0 comments on commit fdd1f9c

Please sign in to comment.