Skip to content

bug: InteractiveViewer cannot shrink to the specified scale #5728

@pychans

Description

@pychans

Duplicate Check

Describe the bug

In the latest version of official code(0.70.0.dev6370), InteractiveViewer cannot be scaled down to 0.1 min_scale, but can only be scaled down to the minimum of 0.8 by default

Code sample

Code
import flet as ft


def main(page: ft.Page):
    page.add(
        ft.InteractiveViewer(
            min_scale=0.1,
            max_scale=15,
            # boundary_margin=ft.margin.all(20),
            # on_interaction_start=lambda e: print(e),
            # on_interaction_end=lambda e: print(e),
            # on_interaction_update=lambda e: print(e),
            content=ft.Image(
                src="https://picsum.photos/500/500",
            ),
        )
    )


ft.run(main)

To reproduce

Steps to reproduce:1. Run the repro code 2.Scroll the mouse wheel to zoom out the picture 3.It will be found that only 0.8 min_scale can be reached

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 10

Flet version

0.70.0.dev6370

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions