Skip to content

Commit f337108

Browse files
author
Matt
committed
adding js event names to actions
1 parent 074118d commit f337108

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.github.makbn.jlmap.listener;
22

33
import io.github.makbn.jlmap.model.JLObject;
4+
import lombok.Getter;
45

56

67
public abstract class OnJLObjectActionListener<T extends JLObject<?>> {
@@ -10,19 +11,28 @@ public abstract class OnJLObjectActionListener<T extends JLObject<?>> {
1011
public abstract void move(T t, Action action);
1112

1213

14+
@Getter
1315
public enum Action {
1416
/**
1517
* Fired when the marker is moved via setLatLng or by dragging.
1618
* Old and new coordinates are included in event arguments as oldLatLng, {{@link io.github.makbn.jlmap.model.JLLatLng}}.
1719
*/
18-
MOVE, MOVE_START, MOVE_END,
20+
MOVE("move"),
21+
MOVE_START("movestart"),
22+
MOVE_END("moveend"),
1923
/**
2024
* Fired when the user clicks (or taps) the layer.
2125
*/
22-
CLICK,
26+
CLICK("click"),
2327
/**
24-
* Fired when the user double-clicks (or double-taps) the layer.
28+
* Fired when the user zooms.
2529
*/
26-
DOUBLE_CLICK,
30+
ZOOM("zoom");
31+
32+
final String jsEventName;
33+
34+
Action(String name) {
35+
this.jsEventName = name;
36+
}
2737
}
2838
}

0 commit comments

Comments
 (0)