Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

lockAspectRatio still breaks at independent min/max constraints

Abierto
#277 0 comentarios 0 reacciones 0 asignados Ver en GitHub

@sameerdeolalikar ya está trabajando en esto.

Desde el 26/9/2026.

  • #278 de @sameerdeolalikar — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
2.6k
Forks
373
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de react-grid-layout/react-resizable

Todos los issues de react-grid-layout/react-resizable

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.