Forráskód Böngészése

fix some minor issues in examples

Falko Schindler 8 hónapja
szülő
commit
bd342113f2

+ 0 - 1
docker-compose.yml

@@ -1,4 +1,3 @@
-version: "3.9"
 services:
   app:
     build:

+ 0 - 2
examples/docker_image/docker-compose.yml

@@ -1,5 +1,3 @@
-version: "3.9"
-
 services:
   nicegui:
     image: zauberzeug/nicegui:latest

BIN
examples/image_mask_overlay/OfwWp.png


BIN
examples/image_mask_overlay/PpIqU.png


+ 9 - 7
examples/image_mask_overlay/main.py

@@ -1,8 +1,10 @@
 #!/usr/bin/env python3
-from nicegui import ui
+from nicegui import app, ui
 
-img_src = 'https://i.stack.imgur.com/PpIqU.png'
-mask_src = 'https://i.stack.imgur.com/OfwWp.png'
+app.add_static_files('/images', '.')
+
+img_src = '/images/PpIqU.png'
+mask_src = '/images/OfwWp.png'
 
 with ui.row().classes('w-full flex items-center'):
     ui.image(img_src).style('width: 25%')
@@ -14,10 +16,10 @@ with ui.row().classes('w-full flex items-center'):
         <image xlink:href="{mask_src}" width="100%" height="100%" x="0" y="0" filter="url(#mask)" />
         <filter id="mask">
             <feComponentTransfer>
-                <feFuncR type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
-                <feFuncG type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
-                <feFuncB type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
-                <feFuncR type="linear" slope="1000"/>
+                <feFuncR type="linear" slope="40" />
+                <feFuncG type="linear" slope="40" />
+                <feFuncB type="linear" slope="40" />
+                <feFuncR type="linear" slope="1000" />
             </feComponentTransfer>
             <feColorMatrix type="matrix" values="1 0 0 0 0   0 1 0 0 0   0 0 1 0 0  3 -1 -1 0 0" />
         </filter>

+ 0 - 1
examples/nginx_subpath/docker-compose.yml

@@ -1,4 +1,3 @@
-version: "3.9"
 services:
   app:
     image: zauberzeug/nicegui:1.4.19

+ 0 - 1
examples/ros2/docker-compose.yml

@@ -1,4 +1,3 @@
-version: "3"
 services:
   nicegui:
     build: