[Bug]: SVG export ignores the export scale and the target width
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Empieza por crates/app/src/export.rs en do_export_svg() y crates/renderer/src/svg.rs en render_svg(), y después compara la exportación SVG con el manejo de la escala de PNG. Comprueba cómo llegan la escala y el ancho de destino al renderizador y cómo se establecen las dimensiones SVG. La tarea estará completada cuando las dimensiones SVG reflejen la escala o el ancho de destino elegidos, o cuando los controles estén claramente documentados y deshabilitados para SVG.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
The SVG export ignores both the export scale and the target width. The PNG export honors the scale presets, the custom scale input, and the target width field, but the SVG output is always emitted at 1x logical size.
Steps to reproduce
- Keep the default settings (export scale 2x).
- Export SVG.
- Inspect the
widthandheightattributes of the downloaded file. They match the 1x logical size, not 2x. - Try setting the scale to 8x or setting a target width, then export SVG again. The dimensions do not change.
Expected behavior
The SVG dimensions should reflect the chosen scale, or the scale and target width controls should be clearly documented as PNG-only and disabled or hidden for SVG export.
Actual behavior
render_svg() builds the document from the 1x Layout and never reads options.scale (crates/renderer/src/svg.rs:63, :90). A probe with default settings (scale 2.0) produced width="229.136", exactly the 1x logical width.
Additionally, do_export_svg() computes a scale for the target width via compute_scale_for_width() and then discards it (crates/app/src/export.rs:161-178), so that work is wasted.
Where did it go wrong?
SVG export
Settings
Export scale 2x or higher, or any target width value.
Browser
Not browser specific.
CodeFrame version
0.7.0
Console output or extra context
References:
crates/app/src/export.rs:137-182(do_export_svg)crates/renderer/src/svg.rs:63-90(render_svg)
- Lenguaje dominante
- Rust
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de suradet-ps/codeframe
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
suradet-ps/codeframe#40 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
suradet-ps/codeframe#35 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
suradet-ps/codeframe#36 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Target width input clamps the value on every keystrokePosiblemente ocupada @AnushreeKasturi la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
suradet-ps/codeframe#37 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
suradet-ps/codeframe#38 ·
Los mantenedores suelen responder en 1 día
Todos los issues de suradet-ps/codeframe
Issues similares
-
Stack overflow in `check bans` with `include-dependencies = true` and a dev-dependency cycleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
EmbarkStudios/cargo-deny#910 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
tursodatabase/turso#10054 ·
Los mantenedores suelen responder en 1 día
-
build: Update rust versionPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ibm-granite-community/granite-cli#229 ·
Los mantenedores suelen responder en 1 día
-
setTargetAtTime booked ahead of time starts its curve early (values blow up before start_time)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
orottier/web-audio-api-rs#658 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
aosama/astronomical#1318 ·
Los mantenedores suelen responder en 1 día