Skip to content

Commit

Permalink
Default cue position to auto, fix tests
Browse files Browse the repository at this point in the history
Replace jshitnt ask

Replace space
  • Loading branch information
John Bartos committed Nov 28, 2016
1 parent 86d357c commit ffaf69c
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 34 deletions.
8 changes: 1 addition & 7 deletions lib/vtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,7 @@
cue.snapToLines = settings.get("snapToLines", true);
cue.size = settings.get("size", 100);
cue.align = settings.get("align", "middle");
cue.position = settings.get("position", {
start: 0,
left: 0,
middle: 50,
end: 100,
right: 100
}, cue.align);
cue.position = settings.get("position", "auto");
cue.positionAlign = settings.get("positionAlign", {
start: "start",
left: "start",
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/bad-align.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/keyword-end.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 100,
"position": "auto",
"positionAlign": "end",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/keyword-left.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 0,
"position": "auto",
"positionAlign": "start",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/keyword-middle.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/keyword-right.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 100,
"position": "auto",
"positionAlign": "end",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/align/keyword-start.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 0,
"position": "auto",
"positionAlign": "start",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/bad-line-align.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/bad-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/decimal-percent.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42.12,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/integer-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/large-integer-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 102041241024101120,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/line-end-align.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "end",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/line-middle-align.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "middle",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/line-start-align.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/negative-integer-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": -1208,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/negative-zeros.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 0,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/line/percent-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": 42,
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/position/bad-position.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/region/bad-region.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/region/region-arrows.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": {
"lines": 3,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/region/valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": {
"lines": 3,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/size/bad-size.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/size/decimal-percent.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 42.12,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/size/percent-value.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 42,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/vertical/bad-vertical.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/vertical/correct-lr-keyword.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down
2 changes: 1 addition & 1 deletion tests/cue-settings/vertical/correct-rl-keyword.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"line": "auto",
"lineAlign": "start",
"pauseOnExit": false,
"position": 50,
"position": "auto",
"positionAlign": "middle",
"region": "",
"size": 100,
Expand Down

0 comments on commit ffaf69c

Please sign in to comment.