Support intersection/clipping detection in overlay positioning
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### 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
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現例から始め、接続された 2 つの位置に対する CDK overlay の配置動作を調査します。原点がクリップされるケースを再現し、その後、交差またはクリッピングの検出によって代替位置が選択され、既存の viewport フォールバック動作が維持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100