Skip to content

Commit 0d00f35

Browse files
committed
MINOR: draggable-shapes: set volatility for group instead of each object
Signed-off-by: ttobis <[email protected]>
1 parent e50b317 commit 0d00f35

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

draggable-shapes/demo.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,30 @@ function createDraggableShapes(map) {
99
{lat: -14, lng: -80},
1010
600000,
1111
{
12-
volatility: true, // mark the object as volatile for the smooth dragging
1312
style: {fillColor: 'yellow', lineWidth: 0}
1413
}
1514
),
1615
polygon = new H.map.Polygon(
1716
H.util.wkt.toGeometry(brazilWKTgeometry),
1817
{
19-
volatility: true,
2018
style: {fillColor: 'rgba(255, 0, 0, .5)', lineWidth: 0}
2119
}
2220
),
2321
rect = new H.map.Rect(
2422
new H.geo.Rect(15, -87, 0, -68),
2523
{
26-
volatility: true,
2724
style: {fillColor: 'gray', lineWidth: 0}
2825
}
2926
),
3027
polyline = new H.map.Polyline(
3128
new H.geo.LineString([-22, -80, 0, -32, -75, 0, -32, -70, 0, -42, -65, 0]),
3229
{
33-
volatility: true,
3430
style: {strokeColor: 'blue', lineWidth: 8}
3531
}
3632
),
37-
draggableGroup = new H.map.Group();
33+
draggableGroup = new H.map.Group({
34+
volatility: true // mark the group as volatile for smooth dragging of all it's objects
35+
});
3836

3937
// put all objects into one group
4038
draggableGroup.addObjects([circle, polygon, rect, polyline]);

0 commit comments

Comments
 (0)