Skip to content

Commit 8263bce

Browse files
authored
Merge pull request #12 from kshetline/development
Fix spurious view dragging. Dependency updates, updated GRS.
2 parents 123b59b + 34dab56 commit 8263bce

8 files changed

Lines changed: 987 additions & 774 deletions

File tree

package-lock.json

Lines changed: 944 additions & 735 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svc-ng",
3-
"version": "1.12.1",
3+
"version": "1.12.2",
44
"license": "MIT AND GPL-3.0-or-later",
55
"author": "Kerry Shetline <kerry@shetline.com>",
66
"scripts": {
@@ -14,52 +14,52 @@
1414
},
1515
"private": true,
1616
"dependencies": {
17-
"@angular/animations": "^11.2.3",
18-
"@angular/cdk": "^11.2.2",
19-
"@angular/common": "^11.2.3",
20-
"@angular/compiler": "^11.2.3",
21-
"@angular/core": "^11.2.3",
17+
"@angular/animations": "^11.2.10",
18+
"@angular/cdk": "^11.2.9",
19+
"@angular/common": "^11.2.10",
20+
"@angular/compiler": "^11.2.10",
21+
"@angular/core": "^11.2.10",
2222
"@angular/flex-layout": "^11.0.0-beta.33",
23-
"@angular/forms": "^11.2.3",
24-
"@angular/platform-browser": "^11.2.3",
25-
"@angular/platform-browser-dynamic": "^11.2.3",
26-
"@angular/router": "^11.2.3",
27-
"@fortawesome/fontawesome-free": "^5.15.2",
28-
"@tubular/astronomy": "^2.1.8",
23+
"@angular/forms": "^11.2.10",
24+
"@angular/platform-browser": "^11.2.10",
25+
"@angular/platform-browser-dynamic": "^11.2.10",
26+
"@angular/router": "^11.2.10",
27+
"@fortawesome/fontawesome-free": "^5.15.3",
28+
"@tubular/astronomy": "^2.2.1",
2929
"@tubular/math": "^2.2.0",
30-
"@tubular/time": "^2.4.2",
31-
"@tubular/util": "^3.4.1",
30+
"@tubular/time": "^2.6.0",
31+
"@tubular/util": "^3.6.0",
3232
"array-buffer-reader": "^1.0.4",
3333
"core-js": "^2.6.12",
3434
"detect-resize": "^0.1.5",
3535
"lodash-es": "^4.17.21",
3636
"ng-busy": "^11.0.0",
3737
"primeicons": "^4.1.0",
38-
"primeng": "^11.2.3",
39-
"rxjs": "^6.6.6",
38+
"primeng": "^11.3.2",
39+
"rxjs": "^6.6.7",
4040
"zone.js": "~0.10.2"
4141
},
4242
"devDependencies": {
43-
"@angular-devkit/build-angular": "^0.1102.2",
44-
"@angular/cli": "^11.2.2",
45-
"@angular/compiler-cli": "^11.2.3",
46-
"@angular/language-service": "^11.2.3",
43+
"@angular-devkit/build-angular": "^0.1102.9",
44+
"@angular/cli": "^11.2.9",
45+
"@angular/compiler-cli": "^11.2.10",
46+
"@angular/language-service": "^11.2.10",
4747
"@types/googlemaps": "^3.43.2",
48-
"@types/jasmine": "~3.6.0",
48+
"@types/jasmine": "^3.6.9",
4949
"@types/jasminewd2": "^2.0.8",
5050
"@types/lodash-es": "^4.17.4",
51-
"@typescript-eslint/eslint-plugin": "^4.16.1",
52-
"@typescript-eslint/parser": "^4.16.1",
51+
"@typescript-eslint/eslint-plugin": "^4.22.0",
52+
"@typescript-eslint/parser": "^4.22.0",
5353
"codelyzer": "^6.0.0",
54-
"eslint": "^7.21.0",
54+
"eslint": "^7.24.0",
5555
"eslint-config-standard": "^16.0.2",
5656
"eslint-plugin-import": "^2.22.1",
5757
"eslint-plugin-node": "^11.1.0",
5858
"eslint-plugin-promise": "^4.2.1",
5959
"eslint-plugin-standard": "^5.0.0",
6060
"jasmine-core": "~3.6.0",
6161
"jasmine-spec-reporter": "~5.0.0",
62-
"karma": "~6.1.1",
62+
"karma": "^6.1.2",
6363
"karma-chrome-launcher": "~3.1.0",
6464
"karma-coverage-istanbul-reporter": "~3.0.2",
6565
"karma-jasmine": "~4.0.0",

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="about-dialog">
55
<img src="/assets/resources/svc_lunar_eclipse.png" alt="lunar eclipse" width="64" height="64">
66
<h2>Sky View Café NP</h2>
7-
Version 1.12.1<br><br>
7+
Version 1.12.2<br><br>
88
Copyright © 2016-2021 Kerry Shetline.
99
</div>
1010
</p-dialog>

src/app/svc/generic-view.directive.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { AfterViewInit, Directive, ElementRef, ViewChild } from '@angular/core';
22
import { SafeStyle } from '@angular/platform-browser';
33
import {
44
ASTEROID_BASE, COMET_BASE, EARTH, FIRST_PLANET, HALF_MINUTE, ISkyObserver, LAST_PLANET, NO_MATCH, SkyObserver, SolarSystem,
5-
StarCatalog, UT_to_TDB
5+
StarCatalog
66
} from '@tubular/astronomy';
7-
import { DateTime } from '@tubular/time';
7+
import { DateTime, utToTdt } from '@tubular/time';
88
import { ceil, max, round, sqrt } from '@tubular/math';
99
import { clone, FontMetrics, getFontMetrics, isSafari, isString, padLeft } from '@tubular/util';
1010
import { debounce, throttle } from 'lodash-es';
@@ -362,7 +362,7 @@ export abstract class GenericViewDirective implements AfterViewInit {
362362
this.resetCursor();
363363
this.goodDragStart = false;
364364
}
365-
else if (this.canDrag && button1Down) {
365+
else if (this.canDrag && this.goodDragStart && button1Down) {
366366
this.dragging = true;
367367
this.cursor = this.sanitizedHandCursor;
368368
}
@@ -387,6 +387,7 @@ export abstract class GenericViewDirective implements AfterViewInit {
387387
this.onTouchStart(event);
388388
else if (event.touches.length === 0) {
389389
this.dragging = false;
390+
this.goodDragStart = false;
390391
event.preventDefault();
391392
}
392393
}
@@ -395,6 +396,7 @@ export abstract class GenericViewDirective implements AfterViewInit {
395396
this.lastMoveX = event.offsetX;
396397
this.lastMoveY = event.offsetY;
397398
this.dragging = false;
399+
this.goodDragStart = false;
398400
this.resetCursor();
399401
}
400402

@@ -437,7 +439,7 @@ export abstract class GenericViewDirective implements AfterViewInit {
437439
dc.skyObserver = new SkyObserver(this.appService.longitude, this.appService.latitude);
438440
// Bias time half a minute ahead of the clock time for rounding to the middle of the selected minute.
439441
dc.jdu = DateTime.julianDay(this.time) + HALF_MINUTE;
440-
dc.jde = UT_to_TDB(dc.jdu);
442+
dc.jde = utToTdt(dc.jdu);
441443
dc.inkSaver = GenericViewDirective.printing && this.appService.inkSaver;
442444

443445
this.additionalDrawingSetup(dc);

src/app/svc/svc-calendar-view/svc-calendar-view.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
33
import {
44
AstroEvent, EQ_SOLSTICE_EVENT_BASE, EventFinder, FALL_EQUINOX, FIRST_QUARTER, FULL_MOON, ISkyObserver, JUPITER, LAST_QUARTER, MARS,
55
MERCURY, MOON, NEPTUNE, NEW_MOON, PHASE_EVENT_BASE, PLUTO, RISE_EVENT, RISE_SET_EVENT_BASE, SATURN, SET_EVENT, SkyObserver,
6-
SPRING_EQUINOX, SUMMER_SOLSTICE, SUN, TRANSIT_EVENT, TWILIGHT_BEGINS, TWILIGHT_ENDS, UNSEEN_ALL_DAY, URANUS, UT_to_TDB, VENUS,
6+
SPRING_EQUINOX, SUMMER_SOLSTICE, SUN, TRANSIT_EVENT, TWILIGHT_BEGINS, TWILIGHT_ENDS, UNSEEN_ALL_DAY, URANUS, VENUS,
77
VISIBLE_ALL_DAY, WINTER_SOLSTICE
88
} from '@tubular/astronomy';
9-
import { DateAndTime, DateTime, Timezone, YMDDate } from '@tubular/time';
9+
import { DateAndTime, DateTime, Timezone, utToTdt, YMDDate } from '@tubular/time';
1010
import { ceil, floor, max, min, round } from '@tubular/math';
1111
import { isEdge, isFirefox, isIE } from '@tubular/util';
1212
import { throttle } from 'lodash-es';
@@ -298,7 +298,7 @@ export class SvcCalendarViewComponent implements AfterViewInit {
298298
const noon = new DateTime({ y: date.y, m: date.m, d: Math.abs(date.d), hrs: 12, min: 0, sec: 0 }, timezone, this.appService.gregorianChangeDate);
299299

300300
date.dayLength = dayLength;
301-
date.jdeNoon = UT_to_TDB(DateTime.julianDay(noon.utcTimeMillis));
301+
date.jdeNoon = utToTdt(DateTime.julianDay(noon.utcTimeMillis));
302302
date.text = String(date.d);
303303
date.otherMonth = (date.m !== this.month);
304304
date.highlight = (date.m === this.month && date.d === this.wallTime.d);

src/app/svc/svc-insolation-view/svc-insolation-view.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
22
import { SafeStyle } from '@angular/platform-browser';
3-
import { getInsolationColor, MOON, SUN, UT_to_TDB } from '@tubular/astronomy';
4-
import { DateTime, Timezone } from '@tubular/time';
3+
import { getInsolationColor, MOON, SUN } from '@tubular/astronomy';
4+
import { DateTime, Timezone, utToTdt } from '@tubular/time';
55
import { floor, FMT_DD, FMT_MINS, min, round } from '@tubular/math';
66
import { strokeLine } from '@tubular/util';
77
import { AppService, CurrentTab, Location, UserSetting } from '../../app.service';
@@ -319,7 +319,7 @@ export class SvcInsolationViewComponent extends GenericViewDirective implements
319319
}
320320

321321
const time = new DateTime(DateTime.millisFromJulianDay(jdu), this.dateTime.timezone, this.dateTime.getGregorianChange());
322-
const jde = UT_to_TDB(jdu);
322+
const jde = utToTdt(jdu);
323323

324324
this.skyColor = getInsolationColor(dc.skyObserver, dc.ss, jdu, false);
325325
this.moonColor = getInsolationColor(dc.skyObserver, dc.ss, jdu, true, false);

src/app/svc/svc-time-view/svc-time-view.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component } from '@angular/core';
2-
import { SkyObserver, UT_to_TDB } from '@tubular/astronomy';
3-
import { DAY_MSEC, DateTime, Timezone } from '@tubular/time';
2+
import { SkyObserver } from '@tubular/astronomy';
3+
import { DAY_MSEC, DateTime, Timezone, utToTdt } from '@tubular/time';
44
import { Angle, FMT_MINS, mod2, Mode, round, Unit } from '@tubular/math';
55
import { padLeft, toDefaultLocaleFixed } from '@tubular/util';
66
import { AppService, CurrentTab, Location } from '../../app.service';
@@ -81,7 +81,7 @@ export class SvcTimeViewComponent {
8181
Unit.DEGREES, Mode.RANGE_LIMIT_NONNEGATIVE).toTimeString(FMT_MINS);
8282

8383
this.formattedJulianDate = padLeft(toDefaultLocaleFixed(jdu, 6, 6), 17, nbsp);
84-
this.formattedEphemerisDate = padLeft(toDefaultLocaleFixed(UT_to_TDB(jdu), 6, 6), 17, nbsp);
84+
this.formattedEphemerisDate = padLeft(toDefaultLocaleFixed(utToTdt(jdu), 6, 6), 17, nbsp);
8585
this.formattedDays = padLeft(toDefaultLocaleFixed(this.time / DAY_MSEC, 6, 6), 17, nbsp);
8686
this.formattedSeconds = padLeft(toDefaultLocaleFixed(this.time / 1000, 0, 0), 17, nbsp);
8787
}

src/assets/about.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
<h2 class="header-sans"><a name="history">What's New / Version History</a></h2>
6262
<div style="padding-left: 1em; text-indent: -1em">
6363

64+
<p><b>1.12.2 2021-04-20:</b> Fix spurious view dragging. Dependency updates, updated GRS.</p>
65+
6466
<p><b>1.12.1 2021-03-01:</b> Fix dropdown calendar formatting on Safari.</p>
6567

6668
<p><b>1.12.0 2021-02-23:</b> Add UTC-offset option for timezone selection. Fix side panel help links.</p>

0 commit comments

Comments
 (0)