***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
testwebapp3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Schöberl, Joachim
testwebapp3
Commits
00893916
Commit
00893916
authored
4 weeks ago
by
Schöberl, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
first test
parent
ddeef1ab
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test_ngswebapp.py
+31
-0
31 additions, 0 deletions
test_ngswebapp.py
with
31 additions
and
0 deletions
test_ngswebapp.py
0 → 100644
+
31
−
0
View file @
00893916
from
webapp_client.app
import
App
from
webapp_client.components
import
*
from
webapp_client.qcomponents
import
*
from
webapp_client.visualization
import
WebguiComponent
import
micropip
await
micropip
.
install
(
"
ngsolve
"
)
import
ngsolve
as
ngs
import
ngsolve.webgui
gui
=
WebguiComponent
(
id
=
"
webgui
"
)
gui2
=
WebguiComponent
(
id
=
"
webgui2
"
)
mesh
=
ngs
.
Mesh
(
ngs
.
unit_square
.
GenerateMesh
(
maxh
=
0.05
))
f
=
ngs
.
Parameter
(
1
)
def
increment
():
f
.
Set
(
f
.
Get
()
+
1
)
draw
()
def
draw
():
gui
.
draw
(
ngs
.
sin
(
2
*
ngs
.
pi
*
f
*
ngs
.
x
),
mesh
,
deformation
=
True
,
scale
=
0.3
)
gui2
.
draw
(
ngs
.
sin
(
2
*
ngs
.
pi
*
f
*
ngs
.
y
),
mesh
,
deformation
=
True
,
scale
=
0.3
)
gui
.
on_mounted
(
draw
)
label
=
QBar
(
"
Joachim
'
s first app
"
)
b1
=
QBtn
(
"
Inc Button
"
,
ui_outline
=
True
).
on_click
(
increment
)
component
=
Centered
(
Row
(
label
,
b1
),
Row
(
gui
,
gui2
)
)
App
(
component
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment