Skip to content

Commit 48189a1

Browse files
authored
(feat): add settings to show or not dignities text (#58)
add SHOW_DIGNITIES_TEXT to settings, default true closes #55
1 parent 2d14793 commit 48189a1

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

dist/astrochart.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/project/src/settings.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export interface Settings {
104104
ADD_CLICK_AREA: boolean;
105105
COLLISION_RADIUS: number;
106106
ASPECTS: Aspect;
107+
SHOW_DIGNITIES_TEXT: boolean;
107108
DIGNITIES_RULERSHIP: string;
108109
DIGNITIES_DETRIMENT: string;
109110
DIGNITIES_EXALTATION: string;

project/src/radix.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ class Radix {
194194
} else {
195195
textsToShow.push('')
196196
}
197-
textsToShow = textsToShow.concat(zodiac.getDignities({ name: point.name, position: this.data.planets[point.name][0] }, this.settings.DIGNITIES_EXACT_EXALTATION_DEFAULT).join(','))
197+
198+
if (this.settings.SHOW_DIGNITIES_TEXT)
199+
textsToShow = textsToShow.concat(zodiac.getDignities({ name: point.name, position: this.data.planets[point.name][0] }, this.settings.DIGNITIES_EXACT_EXALTATION_DEFAULT).join(','))
198200

199201
const pointDescriptions = getDescriptionPosition(point, textsToShow, this.settings)
200202
pointDescriptions.forEach(function (dsc) {

project/src/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export interface Settings {
102102
ADD_CLICK_AREA: boolean
103103
COLLISION_RADIUS: number
104104
ASPECTS: Aspect
105+
SHOW_DIGNITIES_TEXT: boolean
105106
DIGNITIES_RULERSHIP: string
106107
DIGNITIES_DETRIMENT: string
107108
DIGNITIES_EXALTATION: string
@@ -289,6 +290,7 @@ const settings: Settings = {
289290
},
290291

291292
// Dignities
293+
SHOW_DIGNITIES_TEXT: true,
292294
DIGNITIES_RULERSHIP: 'r',
293295
DIGNITIES_DETRIMENT: 'd',
294296
DIGNITIES_EXALTATION: 'e',

0 commit comments

Comments
 (0)