mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 03:00:00 +00:00
Autoplay now triggered by thumbnails slider
This commit is contained in:
1 parent
abf9dec6d7
commit
888f4d243a
2 files changed
+9
-3
No files matched your search
+1
@@ -33,6 +33,7 @@ public class SailingFullscreenViewer extends FullscreenContainer<SailingGalleryP
|
||||
|
||||
public void show(SailingImageDTO selected, Collection<SailingImageDTO> images) {
|
||||
showContent(player = new SailingGalleryPlayer(selected, images));
|
||||
autoRefreshControl.setStyleName(IS_AUTOPLAYING_STYLE, player.isAutoplaying());
|
||||
}
|
||||
|
||||
private void toggleAutoplay() {
|
||||
|
||||
+8
-3
@@ -115,13 +115,13 @@ public class SailingGalleryPlayer extends ResizeComposite {
|
||||
}-*/;
|
||||
|
||||
private native void _slickPlay() /*-{
|
||||
$wnd.$('.mainSlider').slick('slickPlay').slick('slickNext').slick(
|
||||
$wnd.$('.subSlider').slick('slickPlay').slick('slickNext').slick(
|
||||
'setOption', 'autoplay', true); // workaround for bug https://github.com/kenwheeler/slick/issues/1446
|
||||
}-*/;
|
||||
|
||||
private native void _slickPause() /*-{
|
||||
$wnd.$('.mainSlider').slick('slickPause').slick('setOption',
|
||||
'autoplay', false); // workaround for bug https://github.com/kenwheeler/slick/issues/1446
|
||||
$wnd.$('.subSlider').slick('slickPause').slick('setOption', 'autoplay',
|
||||
false); // workaround for bug https://github.com/kenwheeler/slick/issues/1446
|
||||
}-*/;
|
||||
|
||||
public void toggleAutoplay() {
|
||||
@@ -133,6 +133,11 @@ public class SailingGalleryPlayer extends ResizeComposite {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUnload() {
|
||||
if (isAutoplaying())
|
||||
toggleAutoplay();
|
||||
}
|
||||
public boolean isAutoplaying() {
|
||||
return autoplay;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user