Explorar el Código

add version information for `additional_resources`

Falko Schindler hace 3 meses
padre
commit
8ff2d279ae

+ 1 - 1
nicegui/elements/leaflet.py

@@ -38,7 +38,7 @@ class Leaflet(Element, component='leaflet.js', default_classes='nicegui-leaflet'
         :param draw_control: whether to show the draw toolbar (default: False)
         :param draw_control: whether to show the draw toolbar (default: False)
         :param options: additional options passed to the Leaflet map (default: {})
         :param options: additional options passed to the Leaflet map (default: {})
         :param hide_drawn_items: whether to hide drawn items on the map (default: False, *added in version 2.0.0*)
         :param hide_drawn_items: whether to hide drawn items on the map (default: False, *added in version 2.0.0*)
-        :param additional_resources: additional resources like CSS or JS files to load (default: None)
+        :param additional_resources: additional resources like CSS or JS files to load (default: None, *added in version 2.11.0*)
         """
         """
         super().__init__()
         super().__init__()
         self.add_resource(Path(__file__).parent / 'lib' / 'leaflet')
         self.add_resource(Path(__file__).parent / 'lib' / 'leaflet')

+ 2 - 0
website/documentation/content/leaflet_documentation.py

@@ -201,6 +201,8 @@ async def wait_for_init() -> None:
     You can add plugins to the map by passing the URLs of JS and CSS files to the `additional_resources` parameter.
     You can add plugins to the map by passing the URLs of JS and CSS files to the `additional_resources` parameter.
     This demo shows how to add the [Leaflet.RotatedMarker](https://github.com/bbecquet/Leaflet.RotatedMarker) plugin.
     This demo shows how to add the [Leaflet.RotatedMarker](https://github.com/bbecquet/Leaflet.RotatedMarker) plugin.
     It allows you to rotate markers by a given `rotationAngle`.
     It allows you to rotate markers by a given `rotationAngle`.
+
+    *Added in version 2.11.0*
 ''')
 ''')
 def leaflet_plugins() -> None:
 def leaflet_plugins() -> None:
     m = ui.leaflet((51.51, -0.09), additional_resources=[
     m = ui.leaflet((51.51, -0.09), additional_resources=[