Skip to content

Commit cff539e

Browse files
committed
fix bases
1 parent 19649fa commit cff539e

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

dist/MLB.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__) => {
4545

4646

4747

48-
const scriptVersion = 9;
48+
const scriptVersion = 10;
4949
const sourceRepo = "evandcoleman/scriptable";
5050
const scriptName = "MLB";
5151

@@ -455,18 +455,18 @@ function getBasesImage(game) {
455455
ctx.setFillColor(new Color("#FFA500"));
456456
ctx.setLineWidth(2);
457457

458-
const firstBasePath = new Path();
459-
firstBasePath.addLines([
458+
const thirdBasePath = new Path();
459+
thirdBasePath.addLines([
460460
new Point(0, side / 2),
461461
new Point(baseHyp / 2, (side / 2) + (baseHyp / 2)),
462462
new Point(baseHyp, side / 2),
463463
new Point(baseHyp / 2, (side / 2) - (baseHyp / 2))
464464
]);
465-
firstBasePath.closeSubpath();
466-
ctx.addPath(firstBasePath);
465+
thirdBasePath.closeSubpath();
466+
ctx.addPath(thirdBasePath);
467467
ctx.strokePath();
468-
if (onFirst) {
469-
ctx.addPath(firstBasePath);
468+
if (onThird) {
469+
ctx.addPath(thirdBasePath);
470470
ctx.fillPath();
471471
}
472472

@@ -485,18 +485,18 @@ function getBasesImage(game) {
485485
ctx.fillPath();
486486
}
487487

488-
const thirdBasePath = new Path();
489-
thirdBasePath.addLines([
488+
const firstBasePath = new Path();
489+
firstBasePath.addLines([
490490
new Point((side / 2) + spaceX, side / 2),
491491
new Point(((side / 2) + spaceX) + (baseHyp / 2), (side / 2) + (baseHyp / 2)),
492492
new Point(((side / 2) + spaceX) + baseHyp, side / 2),
493493
new Point(((side / 2) + spaceX) + (baseHyp / 2), (side / 2) - (baseHyp / 2))
494494
]);
495-
thirdBasePath.closeSubpath();
496-
ctx.addPath(thirdBasePath);
495+
firstBasePath.closeSubpath();
496+
ctx.addPath(firstBasePath);
497497
ctx.strokePath();
498-
if (onThird) {
499-
ctx.addPath(thirdBasePath);
498+
if (onFirst) {
499+
ctx.addPath(firstBasePath);
500500
ctx.fillPath();
501501
}
502502

src/MLB.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import Cache from './lib/cache';
3333
import Updater from './lib/updater';
3434
import * as http from './lib/http';
3535

36-
const scriptVersion = 9;
36+
const scriptVersion = 10;
3737
const sourceRepo = "evandcoleman/scriptable";
3838
const scriptName = "MLB";
3939

@@ -443,18 +443,18 @@ function getBasesImage(game) {
443443
ctx.setFillColor(new Color("#FFA500"));
444444
ctx.setLineWidth(2);
445445

446-
const firstBasePath = new Path();
447-
firstBasePath.addLines([
446+
const thirdBasePath = new Path();
447+
thirdBasePath.addLines([
448448
new Point(0, side / 2),
449449
new Point(baseHyp / 2, (side / 2) + (baseHyp / 2)),
450450
new Point(baseHyp, side / 2),
451451
new Point(baseHyp / 2, (side / 2) - (baseHyp / 2))
452452
]);
453-
firstBasePath.closeSubpath();
454-
ctx.addPath(firstBasePath);
453+
thirdBasePath.closeSubpath();
454+
ctx.addPath(thirdBasePath);
455455
ctx.strokePath();
456-
if (onFirst) {
457-
ctx.addPath(firstBasePath);
456+
if (onThird) {
457+
ctx.addPath(thirdBasePath);
458458
ctx.fillPath();
459459
}
460460

@@ -473,18 +473,18 @@ function getBasesImage(game) {
473473
ctx.fillPath();
474474
}
475475

476-
const thirdBasePath = new Path();
477-
thirdBasePath.addLines([
476+
const firstBasePath = new Path();
477+
firstBasePath.addLines([
478478
new Point((side / 2) + spaceX, side / 2),
479479
new Point(((side / 2) + spaceX) + (baseHyp / 2), (side / 2) + (baseHyp / 2)),
480480
new Point(((side / 2) + spaceX) + baseHyp, side / 2),
481481
new Point(((side / 2) + spaceX) + (baseHyp / 2), (side / 2) - (baseHyp / 2))
482482
]);
483-
thirdBasePath.closeSubpath();
484-
ctx.addPath(thirdBasePath);
483+
firstBasePath.closeSubpath();
484+
ctx.addPath(firstBasePath);
485485
ctx.strokePath();
486-
if (onThird) {
487-
ctx.addPath(thirdBasePath);
486+
if (onFirst) {
487+
ctx.addPath(firstBasePath);
488488
ctx.fillPath();
489489
}
490490

0 commit comments

Comments
 (0)