www.fgks.org   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Explorer Tweaks + ?jumpTo alpha release #4617

Merged
merged 15 commits into from
Aug 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Apply suggestions from code review
  • Loading branch information
cdrini committed Aug 9, 2021
commit 12ed0312803a02cd4f7bd8a15d93eda95e2973e3
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ import CONFIGS from '../configs';
/** @typedef {import('../utils.js').ClassificationNode} ClassificationNode */

/**
cdrini marked this conversation as resolved.
Show resolved Hide resolved
* Given a starting classification node, find the data needed to render the node containing
* the provided classification string.
* @param {ClassificationNode} classificationNode
* @param {string} classification (e.g. 658.91500202854)
*/
Expand All @@ -95,7 +97,7 @@ function findClassification(classificationNode, classification) {
node => testLuceneSyntax(node.query, classification));
if (!path.length) return;

// pad until length is at least 3
// pad until length is at least 3, so that we can destructure into [shelf, bookcase, room]
while (path.length < 3) path.push(null);

// Jump as deep into it as we can. I.e. the last node is the shelf, the second last the bookcase, and the 3rd last is the room.
Expand Down