Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6506cde

Browse files
committed
Improve layout of HTML animation
1 parent22906c2 commit6506cde

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

‎lib/matplotlib/_animation_data.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@
148148

149149
# HTML template for HTMLWriter
150150
DISPLAY_TEMPLATE="""
151-
<divalign="center">
152-
<img>
153-
<br>
154-
<input type="range"style="width:350px"
155-
name="points" min="0" max="1" step="1" value="0"
156-
onchange="anim{id}.set_frame(parseInt(this.value));"></input>
157-
<br>
151+
<divstyle="display: inline-block; text-align:center">
152+
<img>
153+
<input type="range"
154+
style="width:350px; margin-left: auto; margin-right: auto"
155+
name="points" min="0" max="1" step="1" value="0"
156+
onchange="anim{id}.set_frame(parseInt(this.value));"></input>
157+
<div>
158158
<button onclick="anim{id}.slower()"><i class="fa fa-minus"></i></button>
159159
<button onclick="anim{id}.first_frame()"><i class="fa fa-fast-backward">
160160
</i></button>
@@ -171,13 +171,17 @@
171171
<button onclick="anim{id}.last_frame()"><i class="fa fa-fast-forward">
172172
</i></button>
173173
<button onclick="anim{id}.faster()"><i class="fa fa-plus"></i></button>
174+
</div>
174175
<form action="#n" name="_anim_loop_select{id}" class="anim_control">
175-
<input type="radio" name="state"
176-
value="once" {once_checked}> Once </input>
177-
<input type="radio" name="state"
178-
value="loop" {loop_checked}> Loop </input>
179-
<input type="radio" name="state"
180-
value="reflect" {reflect_checked}> Reflect </input>
176+
<input type="radio" name="state" value="once" id="_anim_radio1_{id}"
177+
{once_checked} style="margin: 0; vertical-align: middle">
178+
<label for="_anim_radio1_{id}" style="margin-right: 8px">Once</label>
179+
<input type="radio" name="state" value="loop" id="_anim_radio2_{id}"
180+
{loop_checked} style="margin: 0; vertical-align: middle">
181+
<label for="_anim_radio2_{id}" style="margin-right: 8px">Loop</label>
182+
<input type="radio" name="state" value="reflect" id="_anim_radio1_{id}"
183+
{reflect_checked} style="margin: 0; vertical-align: middle">
184+
<label for="_anim_radio3_{id}" style="margin-right: 8px">Reflect</label>
181185
</form>
182186
</div>
183187

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp