Support intersection/clipping detection in overlay positioning
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
#### What are you trying to do?
I am trying to set a position strategy that works when origin element is clipped. Is there any way to do this without writing a custom position strategy?
#### What troubleshooting steps have you tried?
I tried all the strategies available through CDK Api but without success.
#### Reproduction
https://stackblitz.com/edit/angular-rplbez
Basically, i have to 2 connected positions defined. First that will center the overlay below origin element and another one that will center the overlay above origin element. For example, if element is on the top of the page, overlay would go out of viewport and then second position will be used (below origin element). That works fine. But if origin element is clipped (as in stackblitz example) then overlay will be positioned using first position (above origin element).
Steps to reproduce:
1. Click on a blue square
2. Opened popover is over red header
#### Environment
- Angular: 10.0.9
- CDK/Material: 10.1.3
- Browser(s): Chrome 84.0
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS 10.15.3
Beitragsleitfaden
Rechercherichtung
Beginne mit der verknüpften StackBlitz-Reproduktion und untersuche das Positionierungsverhalten des CDK-Overlays für die beiden verbundenen Positionen. Reproduziere den Fall des abgeschnittenen Ursprungs und überprüfe anschließend, dass die Erkennung von Überschneidungen oder Abschneidungen die alternative Position auswählt und dabei das bestehende Viewport-Fallback-Verhalten beibehält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100