Change DataBase inside svelte to DBState for performance
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { DataBase } from "../../../ts/storage/database";
|
||||
import { DBState } from "../../../ts/storage/database.svelte";
|
||||
import { longpress } from 'src/ts/gui/longtouch';
|
||||
|
||||
let textarea:HTMLElement = $state();
|
||||
@@ -35,6 +35,6 @@
|
||||
use:longpress={handleLongPress}
|
||||
bind:value={value}
|
||||
class="rounded-md p-2 text-textcolor bg-transparent resize-none overflow-y-hidden border border-darkborderc"
|
||||
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
|
||||
style:line-height="{($DataBase.lineHeight ?? 1.25) * ($DataBase.zoomsize / 100)}rem"
|
||||
style:font-size="{0.875 * (DBState.db.zoomsize / 100)}rem"
|
||||
style:line-height="{(DBState.db.lineHeight ?? 1.25) * (DBState.db.zoomsize / 100)}rem"
|
||||
></textarea>
|
||||
Reference in New Issue
Block a user