Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Angular - Toolbar Adaptability providers and types fix
Browse files Browse the repository at this point in the history
DuckTieCorpMember committed Oct 14, 2024
1 parent 2796ba2 commit 99045d5
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions apps/demos/Demos/Toolbar/Adaptability/Angular/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule, Component, enableProdMode } from '@angular/core';
import { NgModule, Component, enableProdMode, inject } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import {
@@ -43,39 +43,32 @@ if (window && window.config.packageConfigPaths) {
})

export class AppComponent {
stylingMode = !themes.current().startsWith('generic') ? 'text' : undefined;

fontSizes: FontSize[] = [];
customService = inject(Service);

lineHeights: LineHeight[] = [];
stylingMode = !themes.current().startsWith('generic') ? 'text' : undefined;

lineHeight: number[] = [this.lineHeights[1]?.lineHeight];
fontSizes: FontSize[] = this.customService.getFontSizes();

lineHeights: LineHeight[] = this.customService.getLineHeights();
lineHeight: number[] = [this.lineHeights[1].lineHeight];

fontFamilies: FontFamily[] = [];
fontFamilies: FontFamily[] = this.customService.getFontFamilies();

headings: Heading[] = [];
headings: Heading[] = this.customService.getHeadings();

heading = this.headings[0]?.text;

fontStyles: FontStyle[] = [];
fontStyles: FontStyle[] = this.customService.getFontStyles();

textAlignItems: TextAlign[] = [];
textAlignItems: TextAlign[] = this.customService.getTextAlign();

textAlignItemsExtended: TextAlignExtended[] = [];
textAlignItemsExtended: TextAlignExtended[] = this.customService.getTextAlignExtended();

selectedTextAlign = [this.textAlignItems[0]?.alignment];

listTypes: ListType[] = [];

constructor(private service: Service) {
this.fontSizes = service.getFontSizes();
this.lineHeights = service.getLineHeights();
this.fontFamilies = service.getFontFamilies();
this.headings = service.getHeadings();
this.fontStyles = service.getFontStyles();
this.textAlignItems = service.getTextAlign();
this.textAlignItemsExtended = service.getTextAlignExtended();
this.listTypes = service.getListType();
listTypes: ListType[] = this.customService.getListType();

constructor() {
}

onTextAlignChanged(e: { itemData: { hint: string } }): void {

0 comments on commit 99045d5

Please sign in to comment.