datastake-daf 0.6.241 → 0.6.243

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.241",
3
+ "version": "0.6.243",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -63,7 +63,6 @@ export function useMapHelper({
63
63
 
64
64
  // Actions to do when active marker is changed
65
65
  useEffect(() => {
66
- console.log("RERENDER");
67
66
  if (mapRef) {
68
67
  if (activeMarker) {
69
68
  mapRef.eachLayer((layer) => {
@@ -285,6 +285,7 @@ export const useMap = ({
285
285
  if (mapRef) {
286
286
  if (type === "chain") {
287
287
  mapRef.on("zoomend", handleZoomChange);
288
+ mapRef.on("movestart", destroyAllPopovers);
288
289
  }
289
290
  }
290
291
 
@@ -292,10 +293,11 @@ export const useMap = ({
292
293
  if (mapRef) {
293
294
  if (type === "chain") {
294
295
  mapRef.off("zoomend", handleZoomChange);
296
+ mapRef.off("movestart", destroyAllPopovers);
295
297
  }
296
298
  }
297
299
  };
298
- }, [mapRef, markerWithPopup, type]);
300
+ }, [mapRef, markerWithPopup]);
299
301
 
300
302
  useEffect(() => {
301
303
  if (mapRef) {
@@ -35,12 +35,12 @@ export default function SDGWidget({
35
35
 
36
36
  const SDGContainer = styled.div`
37
37
  display: grid;
38
- grid-template-columns: repeat(auto-fit, minmax(53px, 1fr));
38
+ grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
39
39
  gap: 8px;
40
40
 
41
41
  .sdg-item {
42
- height: 53px;
43
- width: 53px;
42
+ height: 90px;
43
+ width: 90px;
44
44
  border-radius: 8px;
45
45
  background-size: cover;
46
46
  background-position: center;
@@ -54,30 +54,32 @@ const WidgetCard = ({
54
54
  loading={loading}
55
55
  className="with-tabs no-pt-body"
56
56
  >
57
- <div style={{display: "flex", flexDirection: "column", height: "100%", minHeight: "150px"}}>
57
+ <div style={{display: "flex", flexDirection: "column", height: "100%", marginTop: "0px"}}>
58
58
  <div style={{
59
- flex: 1,
60
59
  display: "flex",
61
60
  flexDirection: "column",
62
61
  justifyContent: "flex-start",
63
- marginTop: "24px",
62
+ marginTop: "10px",
64
63
  marginBottom: "24px",
65
64
  minHeight: "0"
66
65
  }}>
67
66
  {description ? (
68
67
  <p style={{
69
68
  margin: 0,
70
- flex: 1,
71
- display: "flex",
72
- alignItems: "flex-start",
73
- minHeight: "0",
69
+ height: "45px",
70
+ display: "-webkit-box",
71
+ WebkitLineClamp: 3,
72
+ WebkitBoxOrient: "vertical",
73
+ overflow: "hidden",
74
+ textOverflow: "ellipsis",
74
75
  color: '#6C737F',
75
- fontSize: '14px'
76
+ fontSize: '14px',
77
+ lineHeight: '20px'
76
78
  }}>
77
- {description}
79
+ {description.length > 100 ? <Tooltip title={description}>{description.substring(0, 100)}...</Tooltip> : description}
78
80
  </p>
79
81
  ) : (
80
- <div style={{flex: 1}} />
82
+ <div style={{height: "45px"}} />
81
83
  )}
82
84
  </div>
83
85