o
    PÉfô  ã                   @   sF   d dl mZ d dlmZ d dlmZ d dlmZ G dd„ deeƒZdS )é    )ÚTemplate)Ú
JSCSSMixin)ÚMacroElement)Úparse_optionsc                       s<   e Zd ZdZedƒZdgZ						d	‡ fdd„	Z‡  ZS )
ÚPolyLineTextPatha  
    Shows a text along a PolyLine.

    Parameters
    ----------
    polyline: folium.features.PolyLine object
        The folium.features.PolyLine object to attach the text to.
    text: string
        The string to be attached to the polyline.
    repeat: bool, default False
        Specifies if the text should be repeated along the polyline.
    center: bool, default False
        Centers the text according to the polyline's bounding box
    below: bool, default False
        Show text below the path
    offset: int, default 0
        Set an offset to position text relative to the polyline.
    orientation: int, default 0
        Rotate text to a specified angle.
    attributes: dict
        Object containing the attributes applied to the text tag.
        Check valid attributes here:
        https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text#attributes
        Example: {'fill': '#007DEF', 'font-weight': 'bold', 'font-size': '24'}

    See https://github.com/makinacorpus/Leaflet.TextPath for more information.

    zÞ
        {% macro script(this, kwargs) %}
            {{ this.polyline.get_name() }}.setText(
                {{ this.text|tojson }},
                {{ this.options|tojson }}
            );
        {% endmacro %}
        )ÚpolylinetextpathzKhttps://cdn.jsdelivr.net/npm/leaflet-textpath@1.2.3/leaflet.textpath.min.jsFr   Nc	           
   	      s>   t ƒ  ¡  d| _|| _|| _td||||||dœ|	¤Ž| _d S )Nr   )ÚrepeatÚcenterÚbelowÚoffsetÚorientationÚ
attributes© )ÚsuperÚ__init__Ú_nameÚpolylineÚtextr   Úoptions)
Úselfr   r   r   r	   r
   r   r   r   Úkwargs©Ú	__class__r   úm/home/deployuser/azure_apps/autowriter/venv/lib/python3.10/site-packages/folium/plugins/polyline_text_path.pyr   8   s   
úùzPolyLineTextPath.__init__)FFFr   r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	_templateÚ
default_jsr   Ú__classcell__r   r   r   r   r      s    ÿÿ÷r   N)	Újinja2r   Úfolium.elementsr   Úfolium.featuresr   Úfolium.utilitiesr   r   r   r   r   r   Ú<module>   s
    