svelte-log-view 6.0.0 → 6.0.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-log-view",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -17,7 +17,6 @@
17
17
 
18
18
  let done = false;
19
19
 
20
-
21
20
  $effect(() => {
22
21
  if(!done) {
23
22
  fetchFollow();
@@ -25,7 +24,6 @@
25
24
  }
26
25
  });
27
26
 
28
-
29
27
  async function fetchFollow() {
30
28
  let current;
31
29
  if (entries.length > 0) {
@@ -142,7 +140,8 @@
142
140
 
143
141
  function onclick(event) {
144
142
  setFollow(false);
145
- setSelected(start + Math.floor(event.clientY / 22)); // TODO calculate position ?
143
+ const height = event.target.getBoundingClientRect().height; // +4 borde ?
144
+ setSelected(start + Math.floor(event.clientY / height));
146
145
  }
147
146
  </script>
148
147