svelte-log-view 6.3.1 → 6.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/LogView.svelte +8 -16
- package/src/log.css +0 -5
package/package.json
CHANGED
package/src/LogView.svelte
CHANGED
|
@@ -73,22 +73,16 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
if (selected < 0) {
|
|
76
|
-
const
|
|
76
|
+
const additionalEntries = [];
|
|
77
77
|
|
|
78
|
-
for (
|
|
79
|
-
|
|
78
|
+
for await (const entry of source.fetch(entries[0], -fetchAboveRows, fetchAboveRows)) {
|
|
79
|
+
additionalEntries.push(entry);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
offsetRows += fetchAboveRows;
|
|
82
|
+
entries.unshift(...additionalEntries);
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
entries[i++] = entry;
|
|
88
|
-
if (i >= fetchAboveRows) {
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
84
|
+
selected += additionalEntries.length;
|
|
85
|
+
offsetRows += additionalEntries.length;
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
if (selected < offsetRows) {
|
|
@@ -157,10 +151,8 @@
|
|
|
157
151
|
</script>
|
|
158
152
|
|
|
159
153
|
<svelte:window {onkeydown} />
|
|
160
|
-
<log-content bind:this={content}>
|
|
154
|
+
<log-content {onclick} {onkeydown} bind:this={content} role="none">
|
|
161
155
|
{#each visible as entry, i (i)}
|
|
162
|
-
|
|
163
|
-
{@render row(entry, selected, offsetRows + i, follow)}
|
|
164
|
-
</log-row>
|
|
156
|
+
{@render row(entry, selected, offsetRows + i, follow)}
|
|
165
157
|
{/each}
|
|
166
158
|
</log-content>
|