mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 04:53:54 +00:00
Added JSNI method to show reset zoom button after zooming via API
This commit is contained in:
1 parent
fead633e77
commit
702cafd1cd
1 file changed
+8
-1
+8
-1
@@ -226,8 +226,15 @@ public abstract class AbstractRaceChart<SettingsType extends Settings> extends A
|
||||
public void onTimeZoomChanged(Date zoomStartTimepoint, Date zoomEndTimepoint) {
|
||||
changeMinMaxAndExtremesInterval(zoomStartTimepoint, zoomEndTimepoint, true);
|
||||
// Probably there is a function for this in a newer version of highcharts: http://jsfiddle.net/mqz3N/1071/
|
||||
// chart.showResetZoom();
|
||||
this.showResetZoom();
|
||||
}
|
||||
|
||||
// Because there is no method within highcharts Java API, the respective JS method is called via JSNI.
|
||||
private native void showResetZoom() /*-{
|
||||
var chartObject = this.@com.sap.sailing.gwt.ui.client.shared.charts.AbstractRaceChart::chart;
|
||||
var chart = chartObject.@org.moxieapps.gwt.highcharts.client.Chart::getNativeChart()();
|
||||
if (chart) chart.showResetZoom();
|
||||
}-*/;
|
||||
|
||||
@Override
|
||||
public void onTimeRangeChanged(Date fromTime, Date toTime) {
|
||||
|
||||
Reference in new issue
Block a user