Improve scaling response (optically) => with sollution
@oscarlorentzon ya está trabajando en esto.
Desde el 19/11/2019.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
When the size of the mapillary element changes the canvas remains the "old" size for some time.
This is because a higher resolution image needs to be downloaded and/or the canvas needs the be recalculated for the new size. This takes some time which makes the system look a bit sluggish.
Especially when the size of the mapillary gets animated from a relatively small size to a large size the effect is beyond akward.
I fixed this (optically)!
1) I set this in CSS (the container of the canvas)
.mapillary-js-interactive {
height: 100%;
width: 100%;
}
2) Just before I do (and/or detect) the resizing of the window/div I set the canvas (with class 'mapillary-js-canvas') : to
height: 100%;
width: 100%;
3) I call mly.resize(); (after the animation of the resizing is completed!)
The result is that the image of the "old" canvas gets stretched into the new size, that way the complete area remains to be covered with the "old image". When the animation/resizing is complete the new canvas gets calculated.
this can easily be implemented into mapillary-js... no harm done and animation is very exceptable, resulting in an optically more responsive/adaptive feeling :)
PS: you could even go the whole nine yards with calculating the difference in size and alter the percentages accordingly (one at 100% an the other one more, using negative margins to center the image.. haven't done that, yet:P)
PS2: Now that I come to think of it.. why not keep it at 100%/100% by default (for the canvas ant it's container)? I see no reason to force the size of the canvas?
- Lenguaje dominante
- TypeScript
- Estrellas
- 519
- Forks
- 89
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 mapillary/mapillary-js
-
Missing tooltipsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
mapillary/mapillary-js#639 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
mapillary/mapillary-js#638 ·
-
Transition modeAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
mapillary/mapillary-js#633 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
mapillary/mapillary-js#623 ·
-
Add 100% zoom (pixel parity)Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
mapillary/mapillary-js#618 ·
Todos los issues de mapillary/mapillary-js
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
[Bug] remember() with special characters in namespace hangs until timeout instead of returning 400Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MystenLabs/MemWal#1133 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug user-priority/P2
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Effect-TS/effect#8881 · 1 comentario ·
Los mantenedores suelen responder en 1 día