o
    PÉfŽ  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚMacroElement)ÚTemplatec                       s*   e Zd ZdZedƒZd‡ fdd„	Z‡  ZS )Ú
FloatImagea&  Adds a floating image in HTML canvas on top of the map.

    Parameters
    ----------
    image: str
        Url to image location. Can also be an inline image using a data URI
        or a local file using `file://`.
    bottom: int, default 75
        Vertical position from the bottom, as a percentage of screen height.
    left: int, default 75
        Horizontal position from the left, as a percentage of screen width.
    **kwargs
        Additional keyword arguments are applied as CSS properties.
        For example: `width='300px'`.

    aá  
            {% macro header(this,kwargs) %}
                <style>
                    #{{this.get_name()}} {
                        position: absolute;
                        bottom: {{this.bottom}}%;
                        left: {{this.left}}%;
                        {%- for property, value in this.css.items() %}
                          {{ property }}: {{ value }};
                        {%- endfor %}
                        }
                </style>
            {% endmacro %}

            {% macro html(this,kwargs) %}
            <img id="{{this.get_name()}}" alt="float_image"
                 src="{{ this.image }}"
                 style="z-index: 999999">
            </img>
            {% endmacro %}
            éK   c                    s,   t ƒ  ¡  d| _|| _|| _|| _|| _d S )Nr   )ÚsuperÚ__init__Ú_nameÚimageÚbottomÚleftÚcss)Úselfr	   r
   r   Úkwargs©Ú	__class__© úf/home/deployuser/azure_apps/autowriter/venv/lib/python3.10/site-packages/folium/plugins/float_image.pyr   /   s   

zFloatImage.__init__)r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	_templater   Ú__classcell__r   r   r   r   r      s    ÿr   N)Úbranca.elementr   Újinja2r   r   r   r   r   r   Ú<module>   s    