Code cleanup
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
'loaded': () => loaded = value,
|
'loaded': () => loaded = value,
|
||||||
})(key)
|
})(key)
|
||||||
})
|
})
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
export let swiping = true
|
export let swiping = true
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of particles to show
|
* Number of particles to show
|
||||||
*/
|
*/
|
||||||
export let particlesToShow = 1
|
export let particlesToShow = 1
|
||||||
$: {
|
$: {
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of particles to scroll
|
* Number of particles to scroll
|
||||||
*/
|
*/
|
||||||
export let particlesToScroll = 1
|
export let particlesToScroll = 1
|
||||||
$: {
|
$: {
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
}) => {
|
}) => {
|
||||||
pageWindowWidth = width
|
pageWindowWidth = width
|
||||||
data.particleWidth = pageWindowWidth / data.particlesToShow
|
data.particleWidth = pageWindowWidth / data.particlesToShow
|
||||||
|
|
||||||
applyParticleSizes({
|
applyParticleSizes({
|
||||||
particlesContainerChildren: particlesContainer.children,
|
particlesContainerChildren: particlesContainer.children,
|
||||||
particleWidth: data.particleWidth,
|
particleWidth: data.particleWidth,
|
||||||
@@ -240,10 +240,10 @@
|
|||||||
|
|
||||||
function handleHovered(event) {
|
function handleHovered(event) {
|
||||||
data.focused = event.detail.value
|
data.focused = event.detail.value
|
||||||
}
|
}
|
||||||
function handleTapped() {
|
function handleTapped() {
|
||||||
methods.toggleFocused()
|
methods.toggleFocused()
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPrevPage() {
|
function showPrevPage() {
|
||||||
methods.showPrevPage()
|
methods.showPrevPage()
|
||||||
|
|||||||
Reference in New Issue
Block a user