diff --git a/src/app/components/shared/tag-cloud/tag-cloud.component.ts b/src/app/components/shared/tag-cloud/tag-cloud.component.ts index 1e81f07f2f99ccdbef7649cce6ff53dba2a97d1f..d2c8a44b93152764c135c9b51ce1ce0be8aae3e6 100644 --- a/src/app/components/shared/tag-cloud/tag-cloud.component.ts +++ b/src/app/components/shared/tag-cloud/tag-cloud.component.ts @@ -114,18 +114,18 @@ const getDefaultCloudParameters = (): CloudParameters => { const resDefaultColors = getResolvedDefaultColors(); const minValue = window.innerWidth < window.innerHeight ? window.innerWidth : window.innerHeight; const isMobile = minValue < 500; - const elements = isMobile ? 5 : -1; + const elements = isMobile ? 5 : 10; const weightSettings: CloudWeightSettings = [ - { maxVisibleElements: elements, color: resDefaultColors[1], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[2], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[3], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[4], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[5], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[6], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[7], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[8], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[9], rotation: 0, allowManualTagNumber: isMobile }, - { maxVisibleElements: elements, color: resDefaultColors[10], rotation: 0, allowManualTagNumber: isMobile }, + { maxVisibleElements: elements, color: resDefaultColors[1], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[2], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[3], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[4], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[5], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[6], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[7], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[8], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[9], rotation: 0, allowManualTagNumber: true }, + { maxVisibleElements: elements, color: resDefaultColors[10], rotation: 0, allowManualTagNumber: true }, ]; const mapValue = (current: number, minInputValue: number, maxInputValue: number, minOut: number, maxOut: number) => { const value = (current - minInputValue) * (maxOut - minOut) / (maxInputValue - minInputValue) + minOut; diff --git a/src/app/utils/create-comment-keywords.ts b/src/app/utils/create-comment-keywords.ts index 02f8ae6e3cfac85bf124cc0d322653c508328622..773b0c3bbae470add7f80583a0254acfcd3be68e 100644 --- a/src/app/utils/create-comment-keywords.ts +++ b/src/app/utils/create-comment-keywords.ts @@ -5,7 +5,7 @@ export class CreateCommentKeywords { static isKeywordAcceptable(keyword: string) { const regex = /(^[ -@\[-`{-~]+$)/g; - return keyword.match(regex) === null && keyword.length; + return keyword.match(regex) === null && keyword.length > 1; } static isSpellingAcceptable(languagetoolService: LanguagetoolService, text: string, language: Language = 'auto') {