1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add constructor capitalization rule

This commit is contained in:
Bill Thornton 2023-07-06 11:49:55 -04:00
parent 8e2ea6812a
commit ec0adb895b
43 changed files with 103 additions and 94 deletions

View file

@ -5,7 +5,7 @@ import layoutManager from '../../components/layoutManager';
import dom from '../../scripts/dom';
import browser from '../../scripts/browser';
import focusManager from '../../components/focusManager';
import scrollerFactory from '../../libraries/scroller';
import ScrollerFactory from '../../libraries/scroller';
import ScrollButtons from '../emby-scrollbuttons/ScrollButtons';
import './emby-scroller.scss';
@ -41,7 +41,7 @@ const Scroller: FC<ScrollerProps> = ({
scrollPos: 0,
scrollWidth: 0
});
const scrollerFactoryRef = useRef<scrollerFactory | null>(null);
const scrollerFactoryRef = useRef<ScrollerFactory | null>(null);
const getScrollSlider = useCallback(() => {
if (scrollerFactoryRef.current) {
@ -126,7 +126,7 @@ const Scroller: FC<ScrollerProps> = ({
});
}, [getScrollPosition, getScrollSize, getScrollWidth]);
const initCenterFocus = useCallback((elem, scrollerInstance: scrollerFactory) => {
const initCenterFocus = useCallback((elem, scrollerInstance: ScrollerFactory) => {
dom.addEventListener(elem, 'focus', function (e: FocusEvent) {
const focused = focusManager.focusableParent(e.target);
if (focused) {
@ -179,7 +179,7 @@ const Scroller: FC<ScrollerProps> = ({
};
// If just inserted it might not have any height yet - yes this is a hack
scrollerFactoryRef.current = new scrollerFactory(scrollRef.current, options);
scrollerFactoryRef.current = new ScrollerFactory(scrollRef.current, options);
scrollerFactoryRef.current.init();
scrollerFactoryRef.current.reload();

View file

@ -1,4 +1,4 @@
import scroller from '../../libraries/scroller';
import ScrollerFactory from '../../libraries/scroller';
import dom from '../../scripts/dom';
import layoutManager from '../../components/layoutManager';
import inputManager from '../../scripts/inputManager';
@ -140,7 +140,7 @@ ScrollerPrototype.attachedCallback = function () {
};
// If just inserted it might not have any height yet - yes this is a hack
this.scroller = new scroller(scrollFrame, options);
this.scroller = new ScrollerFactory(scrollFrame, options);
this.scroller.init();
this.scroller.reload();

View file

@ -1,6 +1,6 @@
import 'webcomponents.js/webcomponents-lite';
import dom from '../../scripts/dom';
import scroller from '../../libraries/scroller';
import ScrollerFactory from '../../libraries/scroller';
import browser from '../../scripts/browser';
import focusManager from '../../components/focusManager';
import layoutManager from '../../components/layoutManager';
@ -124,7 +124,7 @@ function initScroller(tabs) {
const contentScrollSlider = tabs.querySelector('.emby-tabs-slider');
if (contentScrollSlider) {
tabs.scroller = new scroller(tabs, {
tabs.scroller = new ScrollerFactory(tabs, {
horizontal: 1,
itemNav: 0,
mouseDragging: 1,

View file

@ -19,7 +19,7 @@ function calculateOffset(textarea) {
return offset;
}
function autoGrow(textarea, maxLines) {
function AutoGrow(textarea, maxLines) {
const self = this;
if (maxLines === undefined) {
@ -125,7 +125,7 @@ EmbyTextAreaPrototype.attachedCallback = function () {
label.innerText = text;
};
new autoGrow(this);
new AutoGrow(this);
};
document.registerElement('emby-textarea', {