Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
fix(marquee): marquee effect now doesn't produce unwanted spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Nov 10, 2018
1 parent 189d3d8 commit 2279476
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 38 deletions.
5 changes: 4 additions & 1 deletion src/core/directives/marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const marquee = el => {
const animationDuration = scroller.scrollWidth / 50

setStyles({
'overflow-x': 'auto',
'white-space': 'nowrap'
})(scroller)

Expand All @@ -19,6 +18,10 @@ const marquee = el => {
width: 'auto'
})(scroller)

setStyles({
'overflow': 'auto'
})(scroller)

if (scroller.scrollWidth > el.offsetWidth) {
addClasses('marquee-container')(el)
addClasses('marquee')(scroller)
Expand Down
42 changes: 26 additions & 16 deletions src/statics/example/episode.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,32 @@ export default (extension = {}) => ({
poster: episodePoster,
duration: '04:29:56.685',
link: 'https://freakshow.fm/fs207-berliner-leistungswasser',
audio: [{
url: '//localhost:8080/example.m4a',
size: '102956071',
title: 'MPEG-4 AAC Audio (m4a)',
mimeType: 'audio/mp4'
}, {
url: '//localhost:8080/example.opus',
size: '102078914',
title: 'Opus Audio (opus)',
mimeType: 'audio/opus'
}, {
url: '//localhost:8080/example.ogg',
size: '103595672',
title: 'Ogg Vorbis Audio (oga)',
mimeType: 'audio/ogg'
}],
audio: [
{
url: 'https://freakshow.fm/podlove/file/5172/s/webplayer/c/episode/fs207-berliner-leistungswasser.m4a',
size: '102956071',
title: 'MPEG-4 AAC Audio (m4a)',
mimeType: 'audio/mp4'
},
{
url: 'https://freakshow.fm/podlove/file/5175/s/webplayer/c/episode/fs207-berliner-leistungswasser.opus',
size: '102078914',
title: 'Opus Audio (opus)',
mimeType: 'audio/opus'
},
{
url: 'https://freakshow.fm/podlove/file/5174/s/webplayer/c/episode/fs207-berliner-leistungswasser.oga',
size: '103595672',
title: 'Ogg Vorbis Audio (oga)',
mimeType: 'audio/ogg'
},
{
url: 'https://freakshow.fm/podlove/file/5176/s/webplayer/c/episode/fs207-berliner-leistungswasser.mp3',
size: '162412833',
title: 'MP3 Audio (mp3)',
mimeType: 'audio/mpeg'
}
],
chapters: [{
start: '00:00:00.000',
title: 'Intro',
Expand Down
47 changes: 26 additions & 21 deletions src/statics/example/episode.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,32 @@
"poster": "https:\/\/freakshow.fm\/wp-content\/cache\/podlove\/04\/662a9d4edcf77ea2abe3c74681f509\/freak-show_500x500.jpg",
"duration": "04:29:56.685",
"link": "https:\/\/freakshow.fm\/fs207-berliner-leistungswasser",
"audio": [{
"url": "http://localhost:8080/fs207-berliner-leistungswasser.m4a",
"size": "102956071",
"title": "MPEG-4 AAC Audio (m4a)",
"mimeType": "audio\/mp4"
}, {
"url": "https:\/\/freakshow.fm\/podlove\/file\/5175\/s\/webplayer\/c\/home\/fs207-berliner-leistungswasser.opus",
"size": "102078914",
"title": "Opus Audio (opus)",
"mimeType": "audio\/opus"
}, {
"url": "https:\/\/freakshow.fm\/podlove\/file\/5174\/s\/webplayer\/c\/home\/fs207-berliner-leistungswasser.oga",
"size": "103595672",
"title": "Ogg Vorbis Audio (oga)",
"mimeType": "audio\/ogg"
}, {
"url": "https:\/\/freakshow.fm\/podlove\/file\/5176\/s\/webplayer\/c\/home\/fs207-berliner-leistungswasser.mp3",
"size": "162412833",
"title": "MP3 Audio (mp3)",
"mimeType": "audio\/mpeg"
}],
"audio": [
{
"url": "https://freakshow.fm/podlove/file/5172/s/webplayer/c/episode/fs207-berliner-leistungswasser.m4a",
"size": "102956071",
"title": "MPEG-4 AAC Audio (m4a)",
"mimeType": "audio/mp4"
},
{
"url": "https://freakshow.fm/podlove/file/5175/s/webplayer/c/episode/fs207-berliner-leistungswasser.opus",
"size": "102078914",
"title": "Opus Audio (opus)",
"mimeType": "audio/opus"
},
{
"url": "https://freakshow.fm/podlove/file/5174/s/webplayer/c/episode/fs207-berliner-leistungswasser.oga",
"size": "103595672",
"title": "Ogg Vorbis Audio (oga)",
"mimeType": "audio/ogg"
},
{
"url": "https://freakshow.fm/podlove/file/5176/s/webplayer/c/episode/fs207-berliner-leistungswasser.mp3",
"size": "162412833",
"title": "MP3 Audio (mp3)",
"mimeType": "audio/mpeg"
}
],
"chapters": [{
"start": "00:00:00.000",
"title": "Intro",
Expand Down

0 comments on commit 2279476

Please sign in to comment.