@antv/l7-component 2.22.0 → 2.22.2
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/es/marker.d.ts +1 -0
- package/es/marker.js +7 -4
- package/lib/marker.d.ts +1 -0
- package/lib/marker.js +7 -4
- package/package.json +5 -5
package/es/marker.d.ts
CHANGED
package/es/marker.js
CHANGED
|
@@ -93,7 +93,8 @@ export default class Marker extends EventEmitter {
|
|
|
93
93
|
anchor: anchorType.BOTTOM,
|
|
94
94
|
offsets: [0, 0],
|
|
95
95
|
color: '#5B8FF9',
|
|
96
|
-
draggable: false
|
|
96
|
+
draggable: false,
|
|
97
|
+
overflowHide: true
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
addTo(scene) {
|
|
@@ -364,9 +365,11 @@ export default class Marker extends EventEmitter {
|
|
|
364
365
|
pos.x = newPos.x;
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
if (this.markerOption.overflowHide) {
|
|
369
|
+
// 不在当前可视区域内隐藏点
|
|
370
|
+
if (pos.x > containerWidth || pos.x < 0 || pos.y > containerHeight || pos.y < 0) {
|
|
371
|
+
element.style.display = 'none';
|
|
372
|
+
}
|
|
370
373
|
}
|
|
371
374
|
element.style.left = pos.x + offsets[0] + 'px';
|
|
372
375
|
element.style.top = pos.y - offsets[1] + 'px';
|
package/lib/marker.d.ts
CHANGED
package/lib/marker.js
CHANGED
|
@@ -99,7 +99,8 @@ class Marker extends _eventemitter.EventEmitter {
|
|
|
99
99
|
anchor: _l7Utils.anchorType.BOTTOM,
|
|
100
100
|
offsets: [0, 0],
|
|
101
101
|
color: '#5B8FF9',
|
|
102
|
-
draggable: false
|
|
102
|
+
draggable: false,
|
|
103
|
+
overflowHide: true
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
106
|
addTo(scene) {
|
|
@@ -370,9 +371,11 @@ class Marker extends _eventemitter.EventEmitter {
|
|
|
370
371
|
pos.x = newPos.x;
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
if (this.markerOption.overflowHide) {
|
|
375
|
+
// 不在当前可视区域内隐藏点
|
|
376
|
+
if (pos.x > containerWidth || pos.x < 0 || pos.y > containerHeight || pos.y < 0) {
|
|
377
|
+
element.style.display = 'none';
|
|
378
|
+
}
|
|
376
379
|
}
|
|
377
380
|
element.style.left = pos.x + offsets[0] + 'px';
|
|
378
381
|
element.style.top = pos.y - offsets[1] + 'px';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-component",
|
|
3
|
-
"version": "2.22.
|
|
3
|
+
"version": "2.22.2",
|
|
4
4
|
"description": "Component for L7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "https://github.com/orgs/antvis/people",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"@babel/runtime": "^7.7.7",
|
|
17
17
|
"eventemitter3": "^4.0.0",
|
|
18
18
|
"supercluster": "^7.0.0",
|
|
19
|
-
"@antv/l7-core": "2.22.
|
|
20
|
-
"@antv/l7-layers": "2.22.
|
|
21
|
-
"@antv/l7-utils": "2.22.
|
|
19
|
+
"@antv/l7-core": "2.22.2",
|
|
20
|
+
"@antv/l7-layers": "2.22.2",
|
|
21
|
+
"@antv/l7-utils": "2.22.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"less": "^4.1.3",
|
|
25
|
-
"@antv/l7-test-utils": "^2.22.
|
|
25
|
+
"@antv/l7-test-utils": "^2.22.2"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public",
|