diff --git a/src/components/keys/svg-keyboard-key.component.ts b/src/components/keys/svg-keyboard-key.component.ts index 85ac10af..cbccda2a 100644 --- a/src/components/keys/svg-keyboard-key.component.ts +++ b/src/components/keys/svg-keyboard-key.component.ts @@ -32,7 +32,11 @@ enum LabelTypes { [attr.height]="height" [attr.width]="width" [attr.fill]="fill" /> - + + [attr.text-anchor]="'middle'"> + [attr.x]="width / 3" [attr.y]="height / 3"> ` }) diff --git a/src/components/keys/svg-switch-keymap-key.component.ts b/src/components/keys/svg-switch-keymap-key.component.ts index 88479284..e8169ed0 100644 --- a/src/components/keys/svg-switch-keymap-key.component.ts +++ b/src/components/keys/svg-switch-keymap-key.component.ts @@ -11,17 +11,12 @@ import {MapperService} from '../../services/mapper.service'; [attr.width]="width / 4" [attr.height]="height / 4" [attr.x]="width * 3 / 8" - [attr.y]="height / 5" - fill="white"> + [attr.y]="height / 5"> + [attr.text-anchor]="'middle'"> {{ abbreviation }} ` diff --git a/src/components/keys/svg-text-icon-key.component.ts b/src/components/keys/svg-text-icon-key.component.ts index 2ea03b66..b37a3553 100644 --- a/src/components/keys/svg-text-icon-key.component.ts +++ b/src/components/keys/svg-text-icon-key.component.ts @@ -8,19 +8,14 @@ import { Component, OnInit, Input } from '@angular/core'; + [attr.text-anchor]="width > 2*height ? 'end' : 'middle'"> {{ text }} + [attr.y]="width > 2*height ? height / 3 : height / 2"> ` }) diff --git a/src/components/keys/svg-two-line-text-key.component.ts b/src/components/keys/svg-two-line-text-key.component.ts index 672ede80..e6a8315b 100644 --- a/src/components/keys/svg-two-line-text-key.component.ts +++ b/src/components/keys/svg-two-line-text-key.component.ts @@ -8,11 +8,7 @@ import { Component, OnInit, Input } from '@angular/core'; + [attr.text-anchor]="'middle'">