Giter Club home page Giter Club logo

Comments (13)

oleedd avatar oleedd commented on September 26, 2024

Does it mean that we can't see some bottom bookmarks and the scrolling bar goes under the pop-up?
I described this problem in #89.

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

No, it means the popup is too low. Instead of just below the mouse it is like 30px below the mouse.

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

To reproduce:

  1. Set zoom to 200 in settings
  2. Open extension
  3. Right click first folder / bookmark
  4. Open a bookmark lower down in the extension

Note the difference between 3 and 4, the popup is too low with 4.

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

Yes, I see this. But the title is very confusing - better to use "the right click menu" instead of "popup".

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

Fair enough. I've changed the title.

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

Haha))) Have you seen how dragula works at zoom? It is related to this issue (the distance increases when moving). Can you fix this? I haven't used it. I can fix the rest.

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

More problems with zoom 😕
I think we should not use zoom. It's broken.

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

Need to fix dragula - I almost fixed the rest.

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

It's near impossible to fix dragula, as it all calculated in javascript and I have no idea how to alter that.

I've fixed this by completely removing the zoom option. See #124. The extension still scales with the user's defined font size though, so if people have trouble with their vision and have set a larger font size, the extension will render bigger as well. It did that before, but incorrectly, now it scales correctly (eg favicons scale as well).

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

It's near impossible to fix dragula

You are not right. I can do this. But need to understand how coordinates are changed at zoom. I will still complete this interesting task to grow as I have worked with coordinates before.

from chrome-minimal-bookmarks-tree.

rpkamp avatar rpkamp commented on September 26, 2024

You can do it if you want to, but I will not use the fix in Minimal Bookmarks Tree. Like I said, zoom is broken and I don't want to maintain it anymore.

If you still want to fix it for yourself: when zoom is enabled, all distances are multiplied by (zoom / 100), so a distance of 2px with zoom 200 becomes 2 x (200 / 100) = 4px, a distance of 10px becomes 10px * (200 / 100) = 20px, etc.

It is not possible to fix without changing dragula itself to take zoom into account, and I'm definitely not willing to maintain a modified copy of dragula.

This is why zoom is broken. You have to modify all calculations with coordinates to also use zoom. It's horrible.

By removing zoom support and using rem everything just works without having to change any coordinate calculations. It's much easier, and will work for any future changes as well.

BTW, "near impossible" mean "almost impossible" - I knew it was possible, just not in a nice way without changing dragula itself.

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

BTW, "near impossible" mean "almost impossible" - I knew it was possible, just not in a nice way without changing dragula itself.

I know. But it requires to change dragula because it is need to use the zoom value in the coordinate calculations. It is not very hard but still hard. BTW "near impossible" is much harder than "very hard".

Moreover, I have own much shorter (but not worse - minimalism) project like dragula. So I try to fix my project because the problems are the same. Then it will be easy to fix dragula.

from chrome-minimal-bookmarks-tree.

oleedd avatar oleedd commented on September 26, 2024

Fixed. Created a formula.
It was very tangled because css properties, such as style.top/ style.left and getBoundingClientRect(), don't see any zoom. But coordinate properties. such as clientX/clientY, pageX/pageY and pageYOffset, see zoom. But need to combine all this. So it was "near possible".
BTW, it is very easy to fix #114 by using pageX/pageY.

from chrome-minimal-bookmarks-tree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.