playbook_ui 12.8.0.pre.alpha.PLAY649mapkitstyles299 → 12.8.0.pre.alpha.rubyandnpmalpharelease294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b2766e44f060745f562d270d04023449a7f607340c08dd0ec2051a22f271842
|
4
|
+
data.tar.gz: 87e80cd70d88213de29fae07e2016b431fc8e83bd18f52d4d78f2d27de51f6b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7bf0978437ccb51d4f97d1b2c852195d64715a9c7fb3006a85b96dd52c37c3c31dd2a7032f5c5dd21faaa2378b0ed1b13ead8d36774fe265a012bb1fab19ff7
|
7
|
+
data.tar.gz: 62b23c00d3c829dbdbb32ab5742f481e1a0f354bd27ea6faacb2e61874ab61630308dcc8838032795feca3b3d954a89861459d59fb02ae4ed6d94b35e45a586c
|
@@ -17,46 +17,6 @@
|
|
17
17
|
box-shadow: $shadow_deep;
|
18
18
|
}
|
19
19
|
}
|
20
|
-
|
21
|
-
.mapboxgl-ctrl-attrib.mapboxgl-compact,
|
22
|
-
.maplibregl-ctrl-attrib.maplibregl-compact {
|
23
|
-
background-color: unset;
|
24
|
-
}
|
25
|
-
.mapboxgl-ctrl-attrib.mapboxgl-compact-show,
|
26
|
-
.maplibregl-ctrl-attrib.maplibregl-compact-show {
|
27
|
-
background-color: $card_light;
|
28
|
-
box-shadow: $shadow_deep;
|
29
|
-
color: $text_lt_default;
|
30
|
-
}
|
31
|
-
|
32
|
-
.mapboxgl-ctrl-group:not(:empty),
|
33
|
-
.maplibregl-ctrl-group:not(:empty) {
|
34
|
-
position: absolute;
|
35
|
-
top: 150px;
|
36
|
-
right: $space_xs + 2;
|
37
|
-
margin: unset;
|
38
|
-
box-shadow: unset;
|
39
|
-
border-radius: $border_radius_md;
|
40
|
-
|
41
|
-
.mapbox-gl-draw_ctrl-draw-btn {
|
42
|
-
width: 36px;
|
43
|
-
height: 40px;
|
44
|
-
box-shadow: $shadow_deep;
|
45
|
-
background: $card_light;
|
46
|
-
border: solid 1px $border_light;
|
47
|
-
}
|
48
|
-
|
49
|
-
.mapbox-gl-draw_polygon {
|
50
|
-
border-top-left-radius: $border_radius_md;
|
51
|
-
border-top-right-radius: $border_radius_md;
|
52
|
-
}
|
53
|
-
|
54
|
-
.mapbox-gl-draw_trash {
|
55
|
-
border-bottom-left-radius: $border_radius_md;
|
56
|
-
border-bottom-right-radius: $border_radius_md;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
20
|
.custom-nav-control {
|
61
21
|
position: absolute;
|
62
22
|
right: $space_xs + 2;
|
@@ -93,7 +53,7 @@
|
|
93
53
|
align-items: center;
|
94
54
|
|
95
55
|
svg {
|
96
|
-
width: $space_xs +
|
56
|
+
width: $space_xs + 4;
|
97
57
|
height: $space_sm;
|
98
58
|
display: flex;
|
99
59
|
}
|
@@ -156,18 +116,5 @@
|
|
156
116
|
background-color: #221e3d;
|
157
117
|
}
|
158
118
|
}
|
159
|
-
|
160
|
-
.maplibregl-ctrl-attrib-button {
|
161
|
-
background-color: $text_dk_light;
|
162
|
-
}
|
163
|
-
.mapboxgl-ctrl-attrib.mapboxgl-compact-show,
|
164
|
-
.maplibregl-ctrl-attrib.maplibregl-compact-show {
|
165
|
-
background-color: $bg_dark;
|
166
|
-
box-shadow: $shadow_deep;
|
167
|
-
color: $text_dk_default;
|
168
|
-
a {
|
169
|
-
color: $text_dk_default;
|
170
|
-
}
|
171
|
-
}
|
172
119
|
}
|
173
120
|
}
|
@@ -1,35 +1,28 @@
|
|
1
|
-
import React, { useRef, useEffect
|
2
|
-
import { Map
|
1
|
+
import React, { useRef, useEffect } from 'react'
|
2
|
+
import { Map } from '../../'
|
3
3
|
import maplibregl from 'maplibre-gl'
|
4
4
|
import MapboxDraw from "@mapbox/mapbox-gl-draw";
|
5
|
+
import mapTheme from '../pbMapTheme'
|
5
6
|
|
6
7
|
const MapWithPlugin = (props) => {
|
7
8
|
//set Map instance to access from outside useEffect
|
8
|
-
const [mapInstance, setMapInstance] = useState(null)
|
9
9
|
const mapContainerRef = useRef(null)
|
10
10
|
|
11
11
|
//Set default position
|
12
12
|
const defaultPosition = [-75.379143, 39.831200]
|
13
13
|
|
14
|
-
// linking Maplibre methods to PB custom zoom in, zoom out, and fly to buttons
|
15
|
-
const handleZoomIn = (map) => {map.zoomIn({...mapTheme.zoomConfig})}
|
16
|
-
const handleZoomOut = (map) => {map.zoomOut({...mapTheme.zoomConfig})}
|
17
|
-
const handleFlyTo = (map) => {map.flyTo({
|
18
|
-
center: defaultPosition,
|
19
|
-
... mapTheme.flyToConfig
|
20
|
-
});}
|
21
|
-
|
22
14
|
//This function should contain all maplibre related code
|
23
15
|
const loadMap = ( { target: map }) => {
|
24
16
|
//set marker/pin
|
25
|
-
|
17
|
+
/* eslint-disable-next-line */
|
18
|
+
const marker = new maplibregl.Marker({
|
26
19
|
color: mapTheme.marker,
|
27
20
|
}).setLngLat(defaultPosition)
|
28
21
|
.setPopup(new maplibregl.Popup({className: 'map_popup', closeButton: false}).setHTML(`<h4 class="pb_title_kit_size_4">Hello World!</h4>`)) // add popup
|
29
22
|
.addTo(map);
|
30
23
|
|
31
24
|
//add maplibre default zoom controls
|
32
|
-
|
25
|
+
map.addControl(new maplibregl.NavigationControl({showCompass: false}))
|
33
26
|
|
34
27
|
// disable map zoom when using scroll
|
35
28
|
map.scrollZoom.disable();
|
@@ -43,15 +36,12 @@ const MapWithPlugin = (props) => {
|
|
43
36
|
}
|
44
37
|
});
|
45
38
|
map.addControl(draw);
|
46
|
-
|
47
|
-
//set map instance
|
48
|
-
setMapInstance(map)
|
49
39
|
}
|
50
40
|
|
51
41
|
useEffect(() => {
|
52
42
|
new maplibregl.Map({
|
53
43
|
container: mapContainerRef.current,
|
54
|
-
center:
|
44
|
+
center: [-75.379143, 39.831200],
|
55
45
|
...mapTheme.mapConfig
|
56
46
|
}).on('load', loadMap)
|
57
47
|
}, [])
|
@@ -59,13 +49,7 @@ const MapWithPlugin = (props) => {
|
|
59
49
|
|
60
50
|
|
61
51
|
return (
|
62
|
-
<Map
|
63
|
-
flyToClick={()=> {handleFlyTo(mapInstance)}}
|
64
|
-
zoomBtns
|
65
|
-
zoomInClick={() => {handleZoomIn(mapInstance)}}
|
66
|
-
zoomOutClick={()=> {handleZoomOut(mapInstance)}}
|
67
|
-
{...props}
|
68
|
-
>
|
52
|
+
<Map {...props} >
|
69
53
|
<div
|
70
54
|
ref={mapContainerRef}
|
71
55
|
style={{
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.8.0.pre.alpha.
|
4
|
+
version: 12.8.0.pre.alpha.rubyandnpmalpharelease294
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|