mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 01:59:35 +00:00
Optimised cursor and click area
This commit is contained in:
1 parent
35ee52f7d2
commit
02a251fff0
2 files changed
+16
-16
No files matched your search
+3
@@ -48,6 +48,7 @@
|
||||
/* @alternate */ font-size: 1rem;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
.stageteaser_background {
|
||||
height: 38.666666666666664em;
|
||||
@@ -69,6 +70,7 @@
|
||||
-o-transition: margin 1s ease;
|
||||
-ms-transition: margin 1s ease;
|
||||
transition: margin 1s ease;
|
||||
|
||||
}
|
||||
.stageteaser_content {
|
||||
height: 38.666666666666664em;
|
||||
@@ -120,6 +122,7 @@
|
||||
right: 0;
|
||||
background-color: rgba(51,51,51,0.6);
|
||||
padding: 1.4em 1.666666666666667em;
|
||||
cursor:auto;
|
||||
}
|
||||
.stageteaser_content_band_item {
|
||||
padding: 0 2em;
|
||||
|
||||
+13
-16
@@ -1,8 +1,9 @@
|
||||
package com.sap.sailing.gwt.home.client.shared.stage;
|
||||
|
||||
import com.google.gwt.animation.client.Animation;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.EventTarget;
|
||||
import com.google.gwt.dom.client.SpanElement;
|
||||
import com.google.gwt.dom.client.Style.Display;
|
||||
import com.google.gwt.dom.client.Style.Visibility;
|
||||
@@ -60,17 +61,6 @@ public abstract class StageTeaser extends Composite implements LazyLoadable {
|
||||
String backgroundImage = "url(" + stageImageUrl + ")";
|
||||
teaserImage.getStyle().setBackgroundImage(backgroundImage);
|
||||
|
||||
teaserImage.getStyle().setOpacity(0);
|
||||
new Animation() {
|
||||
|
||||
@Override
|
||||
protected void onUpdate(double progress) {
|
||||
teaserImage.getStyle().setOpacity(progress);
|
||||
|
||||
}
|
||||
}.run(500);
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void handleUserAction() {
|
||||
@@ -92,18 +82,25 @@ public abstract class StageTeaser extends Composite implements LazyLoadable {
|
||||
|
||||
};
|
||||
new Countdown(eventStart, countdownListener);
|
||||
|
||||
|
||||
addDomHandler(new ClickHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
EventTarget eventTarget = event.getNativeEvent().getEventTarget();
|
||||
if (!Element.is(eventTarget)) {
|
||||
return;
|
||||
}
|
||||
Element element = eventTarget.cast();
|
||||
if (stageTeaserBandsPanel.getElement().isOrHasChild(element)) {
|
||||
return;
|
||||
}
|
||||
handleUserAction();
|
||||
|
||||
}
|
||||
}, ClickEvent.getType());
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void updateCountdown(RemainingTime major, RemainingTime minor) {
|
||||
if (major == null && minor == null) {
|
||||
countdownMajorValue.setInnerHTML(null);
|
||||
|
||||
Reference in new issue
Block a user