Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed Jul 31, 2023
1 parent 9b814bd commit 0f12c11
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ window.l = loop(
const $separator = document.createElement('div');
$separator.innerHTML = '&nbsp•&nbsp';
return $separator;
}
},
);
4 changes: 2 additions & 2 deletions src/dynamic-marquee.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Marquee<TMetadata = null> {
/** @deprecated use `touching !== null` instead */
immediatelyFollowsPrevious: boolean;
touching: Touching<TMetadata> | null;
}) => Item | void
}) => Item | void,
): void;
onItemRemoved(callback: ($el: HTMLElement) => void): void;
onAllItemsRemoved(callback: () => void): void;
Expand All @@ -49,5 +49,5 @@ export type LoopReturn = { update: (newBuilders: LoopBuilder[]) => void };
export function loop(
marquee: Marquee,
buildersIn?: LoopBuilder[],
seperatorBuilder?: LoopBuilder | null
seperatorBuilder?: LoopBuilder | null,
): LoopReturn;
2 changes: 1 addition & 1 deletion src/loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function loop(marquee, buildersIn = [], seperatorBuilder = null) {

const { startString1, startString2, length } = longestSubstring(
buildersStructure,
newBuildersStructure
newBuildersStructure,
);
if (lastIndex >= startString1 && lastIndex < startString1 + length) {
// we are in the overlapping region
Expand Down
12 changes: 6 additions & 6 deletions src/marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class Marquee {
upDown = false,
// start on screen
startOnScreen = false,
} = {}
} = {},
) {
this._boundary = new Boundary({
onEnter: () => ({
Expand Down Expand Up @@ -214,7 +214,7 @@ export class Marquee {
this._direction === DIRECTION.RIGHT
? this._containerSizeWatcher.getWidth()
: this._containerSizeWatcher.getHeight(),
1
1,
);
}

Expand Down Expand Up @@ -242,7 +242,7 @@ export class Marquee {

const maxSize = this._items.length
? Math.max(
...this._items.map(({ item }) => item.getSize({ inverse: true }))
...this._items.map(({ item }) => item.getSize({ inverse: true })),
)
: 0;

Expand Down Expand Up @@ -324,7 +324,7 @@ export class Marquee {
this._slider.setOffset(
this._windowOffset * -1,
this._rate,
resynced || goneVisible
resynced || goneVisible,
);

if (!this._correlation || this._correlation.rate !== this._rate) {
Expand Down Expand Up @@ -384,7 +384,7 @@ export class Marquee {
// switch to positive which requests an item, and then switch back to negative again
// and provide an item
offsetIfWasTouching,
this._windowOffset + containerSize
this._windowOffset + containerSize,
),
},
];
Expand All @@ -403,7 +403,7 @@ export class Marquee {
// which can happen if you have positive rate, switch to negative which requests an item,
// and then switch back to positive again and provide an item
offsetIfWasTouching,
this._windowOffset - this._pendingItem.getSize()
this._windowOffset - this._pendingItem.getSize(),
),
},
...this._items,
Expand Down

0 comments on commit 0f12c11

Please sign in to comment.