Popups are sometimes outside of the window on certain zoom levels

This fixes two (known) cases:
1. Window is zoomed in a lot, popup is on the left side of an anchor,
   popup is too large to fit in completely, there is no space on the
   right side of the anchor. Popup is switched to the right because
   _prefLocationWithAnchor uses a fractional anchorBounds.x but a
   rounded popupWidth resulting in -0.999 (anchorBounds.x - popupWidth).
   296537
2. Window is zoomed out a lot, popup is aligned topedge and right,
   anchor is at top: 10px with a margin-top: 10px.
   Browser returns 9.984px for the y position of the anchor
   (due to zoom) but margin stays at 10px -> pref location.y would be
   -0.16px resulting in a wrong popup switch.
   Fixed by adding some tolerance when calculating whether switch is
   necessary.
   263404

The code in PopupLayout should now be obsolete. Also, the popup layout
itself uses exact measurement for its size for quite a while, so
it should be more consistent now.

Change-Id: I3b0c92c05145f0d47be83e71a481e7a5196c200d
Reviewed-on: https://git.eclipse.org/r/c/scout/org.eclipse.scout.rt/+/182706
Tested-by: Scout Bot <scout-bot@eclipse.org>
Reviewed-by: Claudio Guglielmo <claudio.guglielmo@bsiag.com>
2 files changed
tree: 2c2791090cbc07f2f359e33bf10cb4785557ebc2
  1. eclipse-scout-chart/
  2. eclipse-scout-cli/
  3. eclipse-scout-core/
  4. eclipse-scout-releng/
  5. eslint-config/
  6. karma-jasmine-scout/
  7. license_files/
  8. org.eclipse.scout.dev.jetty/
  9. org.eclipse.scout.dev.jetty.test/
  10. org.eclipse.scout.dev.jetty.test.affix/
  11. org.eclipse.scout.jaxws.apt/
  12. org.eclipse.scout.json/
  13. org.eclipse.scout.rt/
  14. org.eclipse.scout.rt.chart.client/
  15. org.eclipse.scout.rt.chart.shared/
  16. org.eclipse.scout.rt.chart.ui.html/
  17. org.eclipse.scout.rt.client/
  18. org.eclipse.scout.rt.client.test/
  19. org.eclipse.scout.rt.dataformat/
  20. org.eclipse.scout.rt.dataobject/
  21. org.eclipse.scout.rt.dataobject.test/
  22. org.eclipse.scout.rt.jackson/
  23. org.eclipse.scout.rt.jackson.test/
  24. org.eclipse.scout.rt.mail/
  25. org.eclipse.scout.rt.mail.test/
  26. org.eclipse.scout.rt.mom.api/
  27. org.eclipse.scout.rt.mom.api.test/
  28. org.eclipse.scout.rt.mom.jms/
  29. org.eclipse.scout.rt.mom.jms.test/
  30. org.eclipse.scout.rt.platform/
  31. org.eclipse.scout.rt.platform.test/
  32. org.eclipse.scout.rt.rest/
  33. org.eclipse.scout.rt.rest.jackson/
  34. org.eclipse.scout.rt.rest.jersey.client/
  35. org.eclipse.scout.rt.rest.jersey.test/
  36. org.eclipse.scout.rt.rest.test/
  37. org.eclipse.scout.rt.security/
  38. org.eclipse.scout.rt.security.test/
  39. org.eclipse.scout.rt.server/
  40. org.eclipse.scout.rt.server.commons/
  41. org.eclipse.scout.rt.server.commons.test/
  42. org.eclipse.scout.rt.server.jaxws/
  43. org.eclipse.scout.rt.server.jaxws.test/
  44. org.eclipse.scout.rt.server.jdbc/
  45. org.eclipse.scout.rt.server.jdbc.test/
  46. org.eclipse.scout.rt.server.test/
  47. org.eclipse.scout.rt.serverbridge/
  48. org.eclipse.scout.rt.shared/
  49. org.eclipse.scout.rt.shared.test/
  50. org.eclipse.scout.rt.svg.client/
  51. org.eclipse.scout.rt.svg.client.test/
  52. org.eclipse.scout.rt.svg.ui.html/
  53. org.eclipse.scout.rt.ui.html/
  54. org.eclipse.scout.rt.ui.html.selenium/
  55. org.eclipse.scout.rt.ui.html.test/
  56. shell_scripts/
  57. .gitattributes
  58. .gitignore
  59. .gitreview
  60. CONTRIBUTING.md
  61. LICENSE
  62. NOTICE.md
  63. pnpm-workspace.yaml
  64. pom.xml
  65. README.md
README.md

Eclipse Scout - RT

Eclipse Scout is a mature and open framework for modern business applications. It substantially boosts developer productivity and is simple to learn.

This Repository Eclipse Scout RT contains the source for the runtime components of the Eclipse Scout Framework.

Downloads

The content of this repository is built on the Eclipse infrastructure and published to various repositories (e.g. Maven Central for the Java code and npmjs for the JavaScript code).

The easiest way to start with Eclipse Scout is to visit the homepage.

Documentation & Links

Contribution Guidelines

We welcome any kind of contributions (Bug report, documentation, code contribution...). Please read the Eclipse Scout Contribution page to learn more about it.

Get in Touch

To get in touch with the Eclipse Scout community, please open a thread in the Eclipse Scout Forum.

License

Eclipse Public License (EPL) v1.0