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) {
|
function getClosestEdgeToElement(element) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const rect = element.getBoundingClientRect();
|
const bounding = element.getBoundingClientRect();
|
||||||
const distances = {
|
const distances = {
|
||||||
top: rect.top,
|
top: bounding.top,
|
||||||
right: window.innerWidth - rect.right,
|
right: window.innerWidth - bounding.right,
|
||||||
bottom: window.innerHeight - rect.bottom,
|
bottom: window.innerHeight - bounding.bottom,
|
||||||
left: rect.left
|
left: bounding.left
|
||||||
};
|
};
|
||||||
|
|
||||||
return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b);
|
return Object.keys(distances).reduce((a, b) => distances[a] < distances[b] ? a : b);
|
||||||
|
|
@ -519,6 +519,10 @@ function convertToRomanNumeral(num) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function capitalizeFirstLetter(text) {
|
||||||
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
||||||
|
}
|
||||||
|
|
||||||
// CONCEPTS
|
// CONCEPTS
|
||||||
|
|
||||||
// NOTE: Benutzt private Zuweisungen
|
// NOTE: Benutzt private Zuweisungen
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue