feat: Add capitalizeFirstLetter() to app
This commit is contained in:
parent
e5516c81f1
commit
5092c1680d
1 changed files with 9 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue