Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High value width results in unresponsiveness #135

Open
DustinDust opened this issue Apr 19, 2023 · 0 comments
Open

High value width results in unresponsiveness #135

DustinDust opened this issue Apr 19, 2023 · 0 comments

Comments

@DustinDust
Copy link

DustinDust commented Apr 19, 2023

I want to implement the zooming in/out functionality. I've read from comments in #58 that using scale might results in high memory usage, so I implemented it with the width attribute. However, when zooming to high width (about as wide as my screen) still make the page unresponsive for a certain amount of time (for a resize or something, I'm not exactly sure, also the higher the width value, the longer it takes) then everything go back to normal.

Here's my code:

<script setup lang="ts">
import { ref } from 'vue';
import VuePdfEmbed from 'vue-pdf-embed';
const width = ref<number>(500);
</script>

<template>
    <div class="pdf-view-wrapper">
        <v-btn @click="width *= 1.25">In</v-btn>
        <v-btn @click="width /= 1.25">Out</v-btn>
        <VuePdfEmbed
            :source="---pdf url---"
            :width="width"
        ></VuePdfEmbed>
    </div>
</template>
@DustinDust DustinDust changed the title High value width results in lags High value width results in unresponsiveness Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant