feat: Add long press functionality to AutoresizeArea component
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { DataBase } from "../../../ts/storage/database";
|
||||
import { longpress } from 'src/ts/gui/longtouch';
|
||||
|
||||
let textarea;
|
||||
let previousScrollHeight = 0;
|
||||
export let value = ''
|
||||
export let handleLongPress = (e:MouseEvent) => {};
|
||||
|
||||
function resize() {
|
||||
textarea.style.height = '0px'; // Reset the textarea height
|
||||
@@ -39,6 +41,7 @@
|
||||
<textarea
|
||||
bind:this={textarea}
|
||||
on:input={handleInput}
|
||||
use:longpress={handleLongPress}
|
||||
bind:value={value}
|
||||
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
|
||||
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem"
|
||||
|
||||
Reference in New Issue
Block a user