diff --git a/src/app/coordinate-system/coordinate-system.component.sass b/src/app/coordinate-system/coordinate-system.component.sass index c2ed8f3..0b13fdd 100644 --- a/src/app/coordinate-system/coordinate-system.component.sass +++ b/src/app/coordinate-system/coordinate-system.component.sass @@ -82,6 +82,7 @@ p text-align: center margin-left: -10px + cursor: default .measure-band-y opacity: 0.6 !important @@ -98,3 +99,4 @@ p text-align: center margin-left: 10px + cursor: default diff --git a/src/app/service/move.service.ts b/src/app/service/move.service.ts index 0b0c7dc..57376ed 100644 --- a/src/app/service/move.service.ts +++ b/src/app/service/move.service.ts @@ -5,8 +5,6 @@ import { ObjectService } from './object.service'; providedIn: 'root', }) export class MoveService { - static G = 6.6743e-11; - private interval: any | null = null; isPlaying: boolean = false; diff --git a/src/app/service/settings.service.ts b/src/app/service/settings.service.ts index 4d71da9..ff731f9 100644 --- a/src/app/service/settings.service.ts +++ b/src/app/service/settings.service.ts @@ -1,6 +1,11 @@ import { Injectable } from '@angular/core'; import { LocalStorageService } from './local-storage.service'; import { CoordinateSystemComponent } from '../coordinate-system/coordinate-system.component'; +import { + CollisionMode, + collisionModeToString, + rotateCollisionMode, +} from '../../types/CollisionMode'; @Injectable({ providedIn: 'root', @@ -14,6 +19,8 @@ export class SettingsService { private static showLogo = true; private static showSettings = true; + private static collisionMode: CollisionMode = CollisionMode.IGNORE; + static init() { if (this.isInit) { return; @@ -25,6 +32,7 @@ export class SettingsService { this.showVelocityArrow = settings.showVelocityArrow; this.showLogo = settings.showLogo; this.showSettings = settings.showSettings; + this.collisionMode = settings.collisionMode; } this.isInit = true; } @@ -37,6 +45,7 @@ export class SettingsService { showVelocityArrow: this.showVelocityArrow, showLogo: this.showLogo, showSettings: this.showSettings, + collisionMode: this.collisionMode, }); } @@ -89,6 +98,17 @@ export class SettingsService { this.saveSettings(); } + static getCollisionMode(): string { + this.init(); + return collisionModeToString(this.collisionMode); + } + + static toggleCollisionMode(): void { + this.init(); + this.collisionMode = rotateCollisionMode(this.collisionMode); + this.saveSettings(); + } + static toggleGridSize(): void { this.init(); diff --git a/src/app/settings/settings/settings.component.html b/src/app/settings/settings/settings.component.html index c253840..7c7e78c 100644 --- a/src/app/settings/settings/settings.component.html +++ b/src/app/settings/settings/settings.component.html @@ -61,11 +61,8 @@
Collision Mode
-