Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
visb-visualisation-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
visb-visualisation-examples
Commits
b9ea56f3
Commit
b9ea56f3
authored
4 years ago
by
Michael Leuschel
Browse files
Options
Downloads
Patches
Plain Diff
improve train visualisation
parent
584d9e86
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Train/TwoTrains.json
+8
-1
8 additions, 1 deletion
Train/TwoTrains.json
Train/TwoTrains.svg
+16
-3
16 additions, 3 deletions
Train/TwoTrains.svg
with
24 additions
and
4 deletions
Train/TwoTrains.json
+
8
−
1
View file @
b9ea56f3
...
@@ -16,6 +16,13 @@
...
@@ -16,6 +16,13 @@
"value"
:
"svg_train(train_rear_end(%0), train_length(%0) ,100.0/real(TrackElementNumber+1),1.0,3.0)"
,
"value"
:
"svg_train(train_rear_end(%0), train_length(%0) ,100.0/real(TrackElementNumber+1),1.0,3.0)"
,
"comment"
:
"show train position using a slanted polygon"
"comment"
:
"show train position using a slanted polygon"
},
},
{
"repeat"
:
[
"tr1"
,
"tr2"
],
"id"
:
"train_back_%0"
,
"attr"
:
"points"
,
"value"
:
"svg_train(real(train_rear_end(%0)), 0.3 ,100.0/real(TrackElementNumber+1),0.0,3.0)"
,
"comment"
:
"show train back polygon"
},
{
{
"repeat"
:
[
"tr1"
,
"tr2"
],
"repeat"
:
[
"tr1"
,
"tr2"
],
"id"
:
"train_info_text_%0"
,
"id"
:
"train_info_text_%0"
,
...
@@ -27,7 +34,7 @@
...
@@ -27,7 +34,7 @@
"repeat"
:
[
"tr1"
,
"tr2"
],
"repeat"
:
[
"tr1"
,
"tr2"
],
"id"
:
"train_info_text_%0"
,
"id"
:
"train_info_text_%0"
,
"attr"
:
"text"
,
"attr"
:
"text"
,
"value"
:
"
\"
Train
1
:
\"
^ TO_STRING(train_rear_end(%0)) ^
\"
..
\"
^ TO_STRING(train_rear_end(%0)+train_length(%0))"
,
"value"
:
"
\"
Train
%0
:
\"
^ TO_STRING(train_rear_end(%0)) ^
\"
..
\"
^ TO_STRING(train_rear_end(%0)+train_length(%0))"
,
"comment"
:
"adapt info field of train"
"comment"
:
"adapt info field of train"
},
},
...
...
This diff is collapsed.
Click to expand it.
Train/TwoTrains.svg
+
16
−
3
View file @
b9ea56f3
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
fill : blue
fill : blue
}
}
.train-normal {
.train-normal {
stroke-width: 0.2
5
;
stroke-width: 0.2;
stroke : black;
stroke : black;
fill : lightgray
fill : lightgray
}
}
...
@@ -29,15 +29,24 @@
...
@@ -29,15 +29,24 @@
stroke-width: 0.5;
stroke-width: 0.5;
stroke : black;
stroke : black;
}
}
.train-back {
stroke-width: 0.2;
stroke : black;
fill : green
}
</style>
</style>
<polygon
id =
"train_polygon_tr1"
<polygon
id =
"train_polygon_tr1"
points=
"0,0 100,0"
points=
"0,0 100,0"
class=
"train-normal"
class=
"train-normal"
transform=
"translate(10,16.8)"
/>
transform=
"translate(10,16.8)"
/>
<polygon
id =
"train_back_tr1"
points=
"0,0 100,0"
class=
"train-back"
transform=
"translate(10,16.8)"
/>
<g
transform=
"translate(10,16.8)"
>
<g
transform=
"translate(10,16.8)"
>
<text
text-align=
"left"
x=
"0"
y=
"-2"
<text
text-align=
"left"
x=
"0"
y=
"-2"
font-size =
"2"
fill=
"gray"
font-family=
"sans-serif "
>
font-size =
"2"
fill=
"gray
80
"
font-family=
"sans-serif "
>
<tspan
x=
"3"
id=
"train_info_text_tr1"
visibility=
"hidden"
>
Train 1
</tspan>
<tspan
x=
"3"
id=
"train_info_text_tr1"
visibility=
"hidden"
>
Train 1
</tspan>
</text>
</text>
</g>
</g>
...
@@ -46,9 +55,13 @@
...
@@ -46,9 +55,13 @@
points=
"0,0 100,0"
points=
"0,0 100,0"
class=
"train-normal"
class=
"train-normal"
transform=
"translate(10,16.8)"
/>
transform=
"translate(10,16.8)"
/>
<polygon
id =
"train_back_tr2"
points=
"0,0 100,0"
class=
"train-back"
transform=
"translate(10,16.8)"
/>
<g
transform=
"translate(10,16.8)"
>
<g
transform=
"translate(10,16.8)"
>
<text
text-align=
"left"
x=
"0"
y=
"-2"
<text
text-align=
"left"
x=
"0"
y=
"-2"
font-size =
"2"
fill=
"gray"
font-family=
"sans-serif "
>
font-size =
"2"
fill=
"gray
95
"
font-family=
"sans-serif "
>
<tspan
x=
"3"
id=
"train_info_text_tr2"
visibility=
"hidden"
>
Train 2
</tspan>
<tspan
x=
"3"
id=
"train_info_text_tr2"
visibility=
"hidden"
>
Train 2
</tspan>
</text>
</text>
</g>
</g>
...
...
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