Skip to content

Commit 065af8c

Browse files
committed
Fix LEvented#off
1 parent 4f76d5e commit 065af8c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 4.2.1
2+
* Handle ``LEvented#off`` in the same way as ``LEvented#on``
3+
* Fix incorrect formatting leading to JS error
4+
* Updated dependencies
5+
16
## 4.2.0
27
* Fixed some invalid built JavaScript commands #330
38
* Add basic support for CRS #333

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/LEvented.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,21 @@ default S off(final String type, final String function, final String context)
6363
{
6464
this.invokeSelf(".off("
6565
+ "$0,"
66-
+ (function != null ? "," + function : "")
66+
+ function
6767
+ (context != null ? "," + context : "")
6868
+ ")",
6969
type);
7070
return this.self();
7171
}
7272

73+
/**
74+
* @see <a href="https://leafletjs.com/reference.html#evented-off">Leaflet docs</a>
75+
*/
76+
default S off(final String type, final String function)
77+
{
78+
return this.off(type, function, null);
79+
}
80+
7381
/**
7482
* @see <a href="https://leafletjs.com/reference.html#evented-off">Leaflet docs</a>
7583
*/

0 commit comments

Comments
 (0)