Noitidart / Smart-Zoom

Firefox Addon: Simulates the smart zoom of mobile devices and tablets on desktop. Instead of double tapping though, click and hold to smart zoom into the article. Inspired by jmiller29.
https://addons.mozilla.org/en-US/firefox/addon/smart-zoom/
5 stars 4 forks source link

Zoomr enlarges element with big height so, that the element exceeds the screen by hejght #4

Open difabor opened 10 years ago

difabor commented 10 years ago

Currently Zoomr enlages the element so, that its new width is equal to screen width. So, the elements with big height might exceed screen height. To avoid this small issue I propose the following. Currently: Zoomr = ScreenWidth/ElementOriginalWidth. Proposal: Zoomr = ((ScreenWidth/ElementOriginalWidth)*ElementOriginalHeight < ScreenHeight) ? ScreenWidth/ElementOriginalWidth : ScrrenHeight/ElementOriginalHeight This formula is universal: if Element is too big the Zoomr will be less then 1

Noitidart commented 10 years ago

Thanks man this tracker is great this way when I complete it I can credit you. :) I would have made the topic myself but I wanted to credit you. :)

Issue with this is some paragraphs of text will be shrunk, so maybe enable height shrinking for images only? What do you think? I'm totally open to discussion.

Please no need to apologize in your review on AMO edit, plz edit out if you can. :)

Noitidart commented 10 years ago

A second thought is that we can make left click and hold zoom to fit width. And right click and hold zoom to fit height. And the only on images it can zoom out to fit, but for all others it should only zoom in. What do you think?

difabor commented 10 years ago
  1. At first, you're right, that my proposal is relevant only for images. So, if your addon is able to detect that element is image and only in this case use my proposal, it would be great.
  2. To use right and left clicks is also a solution. But right click should be not for height fit (sometimes it is hard to know width or height will exceed), but for smart fit - similar to my proposal.
  3. I found some small issue for left click. It is even not an issue, but some delicate thing. Let assume I want to select some text. If I press left button and immediately begin to move mouse - no problem, it is OK. But if I'm not so dexterous, your Zoomr wins and enlarges the entire element :) Usually young people don't experience such problem, but older men might have it. So, the best way is to use long right press at all or to make Zoomr only onmouseup.
  4. If you intend to implement two buttons - which of them will return the ZoomR to original?
Noitidart commented 10 years ago

Thanks man! Github only is good because it tracks it :) Thx!

On Tue, May 6, 2014 at 3:04 PM, difabor notifications@github.com wrote:

I answered in GitHub, is it right, or you prefer to answer via email? -- Хорошо, когда у человека есть выбор, но плохо, когда он перед ним стоит ©Livejournal: http://difabor.livejournal.com/Facebook: http://www.facebook.com/boris.raifler 07.05.2014, 00:27, "Noitidart" < notifications@github.com>:A second thought is that we can make left click and hold zoom to fit width. And right click and hold zoom to fit height. And the only on images it can zoom out to fit, but for all others it should only zoom in. What do you think?—Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Noitidart/Zoomr/issues/4#issuecomment-42365907 .

Noitidart commented 10 years ago

Oh that's a big issue on the timing. I need to add an option to adjust hold down time.

Lets just do the image detection thing way. :)

The right mouse button down for height fit can be added later if we think its important, it will be same as it is now. Right now its left button only but it always fits width, so in future if we make it right button to fit height, then holding right button down will bring to original.

difabor commented 10 years ago

But if you can detect an image - there is no need in two buttons, isn't?

Noitidart commented 10 years ago

Some people might prefer fit height. But I think you're right lets forget about the fit height for now. Lets just do fit height on images that are taller then they are wider.

Noitidart commented 8 years ago

@difabor please try the new version. It is much enhanced and has some of your feature enhancements (like preferences page).