Skip to content

Commit 3443209

Browse files
authored
Merge pull request #285 from xdev-software/develop
Release 4.0.1
2 parents 76d0b90 + 602e27f commit 3443209

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.1
2+
* Added shortcut method ``invokeSelfReturn`` #282
3+
* Updated dependencies
4+
15
## 4.0.0
26
⚠️<i>This release contains breaking changes</i>
37

vaadin-maps-leaflet-flow-demo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<mainClass>software.xdev.vaadin.Application</mainClass>
2727

2828
<!-- Dependency-Versions -->
29-
<vaadin.version>24.1.11</vaadin.version>
29+
<vaadin.version>24.1.12</vaadin.version>
3030

3131
<org.springframework.boot.version>3.1.4</org.springframework.boot.version>
3232
</properties>

vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.vaadin.flow.component.dialog.Dialog;
1212
import com.vaadin.flow.component.icon.Icon;
1313
import com.vaadin.flow.component.icon.VaadinIcon;
14+
import com.vaadin.flow.component.notification.Notification;
1415
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
1516
import com.vaadin.flow.router.Route;
1617

@@ -184,6 +185,7 @@ public ComplexDemo()
184185
this.addImageOverlayDemo();
185186
this.addVideoOverlayDemo();
186187
this.addComplexPolygonDemo();
188+
this.addRetrieveClientSideDataDemo();
187189

188190
this.addOpenDialogOverMapDemo();
189191
}
@@ -363,6 +365,17 @@ private void addComplexPolygonDemo()
363365
));
364366
}
365367

368+
private void addRetrieveClientSideDataDemo()
369+
{
370+
// Note: Usage is not recommended as clientside data can be manipulated
371+
this.hlButtons.add(
372+
new Button(
373+
"Get bounds",
374+
ev -> this.map.invokeSelfReturn(".getBounds()")
375+
.then(v -> Notification.show(v.toJson())))
376+
);
377+
}
378+
366379
private void addOpenDialogOverMapDemo()
367380
{
368381
this.hlButtons.add(

vaadin-maps-leaflet-flow/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5050

5151
<!-- Dependency-Versions -->
52-
<vaadin.version>24.1.11</vaadin.version>
52+
<vaadin.version>24.1.12</vaadin.version>
5353
</properties>
5454

5555
<dependencyManagement>
@@ -108,7 +108,7 @@
108108
<dependency>
109109
<groupId>com.fasterxml.jackson.core</groupId>
110110
<artifactId>jackson-databind</artifactId>
111-
<version>2.15.2</version>
111+
<version>2.15.3</version>
112112
</dependency>
113113

114114
<dependency>

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ default PendingJavaScriptResult invokeSelf(final String payload, final Serializa
3636
return this.componentRegistry().execJs(this.clientComponentJsAccessor() + payload, params);
3737
}
3838

39+
/**
40+
* @apiNote Usage is not recommended as clientside data can be manipulated
41+
*/
42+
default PendingJavaScriptResult invokeSelfReturn(final String payload, final Serializable... params)
43+
{
44+
return this.componentRegistry().execJs("return " + this.clientComponentJsAccessor() + payload, params);
45+
}
46+
3947
@SuppressWarnings("unchecked")
4048
default S self()
4149
{

0 commit comments

Comments
 (0)