Encuesta de investigación: Cuéntanos sobre tu experiencia con Blockly
Comenzar encuesta
blockly > svgResize
Variable de cambio de tamaño de svg
Ajusta el tamaño de la imagen SVG para llenar su contenedor por completo. Llámalo cuando la vista cambie de tamaño (p.ej., en un cambio de tamaño de ventana o orientación del dispositivo). Consulta workspace.resizeContents para cambiar el tamaño del lugar de trabajo cuando cambie el contenido (p.ej., cuando se agrega o se quita un bloque). Registra el alto o el ancho de la imagen SVG.
Signature:
svgResize: typeof common.svgResize
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2024-08-22 (UTC)
[null,null,["Última actualización: 2024-08-22 (UTC)"],[[["`svgResize` is a function used to resize the SVG image within its container to ensure it fills the space completely."],["This function should be called when the container's size changes, such as during window resizing or device orientation changes."],["`svgResize` is distinct from `workspace.resizeContents`, which is used for resizing when the workspace content changes (e.g., adding or removing blocks)."],["The function records the updated height and width of the SVG image after resizing."]]],[]]