From 5092c1680dccc70253ffb079cf45139974dc6b97 Mon Sep 17 00:00:00 2001 From: sthag Date: Sat, 14 Feb 2026 18:53:48 +0100 Subject: [PATCH] feat: Add capitalizeFirstLetter() to app --- source/code/hippie/app.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/code/hippie/app.js b/source/code/hippie/app.js index cf842a2..81d2494 100644 --- a/source/code/hippie/app.js +++ b/source/code/hippie/app.js @@ -351,12 +351,12 @@ function checkButtonAndTarget(event, element, button = 0) { function getClosestEdgeToElement(element) { 'use strict'; - const rect = element.getBoundingClientRect(); + const bounding = element.getBoundingClientRect(); const distances = { - top: rect.top, - right: window.innerWidth - rect.right, - bottom: window.innerHeight - rect.bottom, - left: rect.left + top: bounding.top, + right: window.innerWidth - bounding.right, + bottom: window.innerHeight - bounding.bottom, + left: bounding.left }; return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b); @@ -519,6 +519,10 @@ function convertToRomanNumeral(num) { return result; } +function capitalizeFirstLetter(text) { + return text.charAt(0).toUpperCase() + text.slice(1); +} + // CONCEPTS // NOTE: Benutzt private Zuweisungen