Skip to content

Commit

Permalink
fix(Grid View): 🐛 .internal-link was a level too high
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Sep 29, 2021
1 parent 8adb4a5 commit e971c8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26327,7 +26327,6 @@ class MatrixView extends obsidian.ItemView {
alt = altLink;
return;
}
console.log({ alt, altLink });
});
}
}
Expand Down Expand Up @@ -36412,7 +36411,7 @@ function get_each_context_2(ctx, list, i) {
return child_ctx;
}

// (93:8) {#if step.value && settings.gridDots}
// (95:8) {#if step.value && settings.gridDots}
function create_if_block$1(ctx) {
let div;
let each_value_2 = lodash.range(Math.floor(/*wordCounts*/ ctx[2][/*step*/ ctx[24].value] / 1000));
Expand Down Expand Up @@ -36470,7 +36469,7 @@ function create_if_block$1(ctx) {
};
}

// (95:12) {#each range(Math.floor(wordCounts[step.value] / 1000)) as i}
// (97:12) {#each range(Math.floor(wordCounts[step.value] / 1000)) as i}
function create_each_block_2(ctx) {
let span;

Expand All @@ -36496,6 +36495,7 @@ function create_each_block_1$1(ctx) {
let div0;
let t0_value = /*step*/ ctx[24].value + "";
let t0;
let div0_class_value;
let t1;
let t2;
let div1_class_value;
Expand All @@ -36520,8 +36520,9 @@ function create_each_block_1$1(ctx) {
t1 = space();
if (if_block) if_block.c();
t2 = space();
attr(div0, "class", div0_class_value = "" + (null_to_empty(/*resolvedClass*/ ctx[7](/*step*/ ctx[24].value, /*currFile*/ ctx[5])) + " svelte-46v1v3"));

attr(div1, "class", div1_class_value = "breadcrumbs-trail-grid-item \r\n " + /*resolvedClass*/ ctx[7](/*step*/ ctx[24].value, /*currFile*/ ctx[5]) + " \r\n " + (/*step*/ ctx[24].value === ""
attr(div1, "class", div1_class_value = "breadcrumbs-trail-grid-item " + (/*step*/ ctx[24].value === ""
? "breadcrumbs-filler"
: "") + " svelte-46v1v3");

Expand Down Expand Up @@ -36591,7 +36592,7 @@ function create_each_block$1(ctx) {
insert(target, each_1_anchor, anchor);
},
p(ctx, dirty) {
if (dirty & /*resolvedClass, allRuns, currFile, settings, Math, children, openOrSwitch, app, hoverPreview, activeLeafView, range, wordCounts*/ 766) {
if (dirty & /*allRuns, settings, Math, children, openOrSwitch, app, currFile, hoverPreview, activeLeafView, range, wordCounts, resolvedClass*/ 766) {
each_value_1 = /*allRuns*/ ctx[9][/*i*/ ctx[23]];
let i;

Expand Down Expand Up @@ -36650,7 +36651,7 @@ function create_fragment$1(ctx) {
}
},
p(ctx, [dirty]) {
if (dirty & /*allRuns, resolvedClass, currFile, settings, Math, children, openOrSwitch, app, hoverPreview, activeLeafView, range, wordCounts*/ 766) {
if (dirty & /*allRuns, settings, Math, children, openOrSwitch, app, currFile, hoverPreview, activeLeafView, range, wordCounts, resolvedClass*/ 766) {
each_value = /*transposedTrails*/ ctx[8];
let i;

Expand Down
10 changes: 6 additions & 4 deletions src/Components/TrailGrid.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@
{#each transposedTrails as col, i}
{#each allRuns[i] as step}
<div
class="breadcrumbs-trail-grid-item
{resolvedClass(step.value, currFile)}
{step.value === '' ? 'breadcrumbs-filler' : ''}"
class="breadcrumbs-trail-grid-item {step.value === ''
? 'breadcrumbs-filler'
: ''}"
style="
grid-area: {step.first + 1} / {i + 1} /
{step.last + 2} / {i + 2};
Expand All @@ -125,7 +125,9 @@
on:click={(e) => openOrSwitch(app, step.value, currFile, e)}
on:mouseover={(e) => hoverPreview(e, activeLeafView, step.value)}
>
<div>{step.value}</div>
<div class={resolvedClass(step.value, currFile)}>
{step.value}
</div>
{#if step.value && settings.gridDots}
<div class="dots">
{#each range(Math.floor(wordCounts[step.value] / 1000)) as i}
Expand Down
1 change: 0 additions & 1 deletion src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ export default class MatrixView extends ItemView {
settings.altLinkFields.forEach(altLinkField => {
const altLink = metadata?.frontmatter?.[altLinkField]
if (altLink) { alt = altLink; return }
console.log({ alt, altLink })
})
}
}
Expand Down

0 comments on commit e971c8e

Please sign in to comment.