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

Enhancement - insert image to fit the current view #454

Closed
1 task done
claws99 opened this issue Jul 19, 2023 · 4 comments
Closed
1 task done

Enhancement - insert image to fit the current view #454

claws99 opened this issue Jul 19, 2023 · 4 comments
Assignees
Labels
enhancement Small enhancements to existing features
Milestone

Comments

@claws99
Copy link

claws99 commented Jul 19, 2023

Is your feature request related to a problem? Please describe

currently insert image, inserts the image in full size. Its a problem because we often download images and they can be pretty large. Resizing after inserting is also quite problematic (try inserting some random large image)

image

Describe your feature request!

Solution:

insert the full size image if it fits in the current viewport. If not scale it down to current viewport and give an option to the user if he intends to insert the fullsize image.

All notetaking softwares (including OneNote) do these.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@claws99 claws99 added the enhancement Small enhancements to existing features label Jul 19, 2023
@CodeDoctorDE
Copy link
Member

How should we scale this image?
How big should the image be if it doesn't fit?

@claws99
Copy link
Author

claws99 commented Jul 19, 2023

We could try scaling it to 30-40% of the viewport width and height. Let's say 30%. Before inserting any image, lets check if the width and height of image is less than 30% of viewport width and height. If it doesn't then resize width (while preserving the aspect ratio) to 30%. Same with the height.

This ensure that always the image is in users view port and he has sufficient room to resize to his needs. If he wants the full size, user can rightclick and insert full size.

@CodeDoctorDE
Copy link
Member

We can also allow resizing if it is less than 30%. Then we can also fit the best.

Then we can also allow fitting with the zoomed view

@CodeDoctorDE CodeDoctorDE added this to the 2.0 milestone Aug 8, 2023
@CodeDoctorDE
Copy link
Member

Added in 2.0.0-beta.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Small enhancements to existing features
Projects
Archived in project
Development

No branches or pull requests

2 participants