mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 19:58:46 +08:00
fix: Cannot read property getModel of null problem on contextmenu when the target is not an item. closes: #1815.
This commit is contained in:
parent
d620c58a0c
commit
c0bbb07824
@ -6,7 +6,8 @@
|
|||||||
- fix: combo edge with uncorrect end points;
|
- fix: combo edge with uncorrect end points;
|
||||||
- fix: combo polyline edge with wrong path;
|
- fix: combo polyline edge with wrong path;
|
||||||
- fix: getViewCenter with padding problem;
|
- fix: getViewCenter with padding problem;
|
||||||
- feat: allow user to configure the initial positions for empty combos.
|
- feat: allow user to configure the initial positions for empty combos;
|
||||||
|
- fix: Cannot read property 'getModel' of null problem on contextmenu when the target is not an item.
|
||||||
|
|
||||||
#### 3.5.10
|
#### 3.5.10
|
||||||
- fix: fitView and fitCenter with animate in the initial state;
|
- fix: fitView and fitCenter with animate in the initial state;
|
||||||
|
@ -94,8 +94,8 @@ export default class Menu extends Base {
|
|||||||
|
|
||||||
const bbox = container.getBoundingClientRect();
|
const bbox = container.getBoundingClientRect();
|
||||||
|
|
||||||
let x = e.item.getModel().x;
|
let x = e.item.getModel().x || e.x;
|
||||||
let y = e.item.getModel().y;
|
let y = e.item.getModel().y || e.y;
|
||||||
|
|
||||||
// 若菜单超出画布范围,反向
|
// 若菜单超出画布范围,反向
|
||||||
if (x + bbox.width > width) {
|
if (x + bbox.width > width) {
|
||||||
|
Loading…
Reference in New Issue
Block a user