lockAspectRatio still breaks at independent min/max constraints
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Start at the lockAspectRatio constraint projection and clamping logic in the current implementation, then run the focused regression test described in the issue. Verify width and height minimum and maximum bounds, overshoot/return, and a subsequent gesture preserve the aspect ratio when possible. Confirm the incompatible-bounds control still gives size constraints precedence.
索引モデルが issue の本文から書いたものです。
説明
With lockAspectRatio enabled, independently calculated width and height constraints can still change the aspect ratio on current master (c6fd4ab8d3d4e9c0707c2bbb6d47d0fcbdb5e6b9, 4.0.2).
For example, start at 300 × 150 (2:1), set minConstraints={[100, 50]} and maxConstraints={[420, 400]}, then drag the southeast handle toward 600 × 300. The current result is 420 × 300 rather than 420 × 210. The width and height are clamped independently after projection onto the ratio line. With a controlled component, that changed ratio also becomes the next resize's input ratio.
Expected: when a size satisfying both bounds and the ratio exists, keep the ratio and choose that size. If the bounds make the ratio impossible, retain size-constraint precedence rather than exceeding a bound.
Related historical report: #51. The current implementation still reproduces this despite the later projection rewrite. I have a focused regression test covering width/height minimum and maximum bounds, overshoot/return and a subsequent gesture. Five new tests fail on unchanged master; the incompatible-bounds control passes.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 373
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-grid-layout/react-resizable のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
react-grid-layout/react-resizable#237 · コメント 8 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
react-grid-layout/react-resizable#222 · コメント 4 件 ·
react-grid-layout/react-resizable の issue をすべて見る
似ている issue
-
area:deploy task
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
wilanis/wilanis-js#1017 ·
メンテナーはふだん 1 日以内に返信
-
documentation v2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/servers#5133 ·
メンテナーはふだん 1 日以内に返信
-
budget bug feature frontend good-issue medium needs-review OSCI'26 payments
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
SatyamPandey-07/WorkSphere#5990 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
lugassawan/swe-workbench#799 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue javascript
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yukikotani231/sqlsift#326 ·
メンテナーはふだん 1 日以内に返信