ElemeFE / ElemeFE/react-amap

BUG:PolyEditor不能正常被激活

Open
#102 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

+ [x] 我已经搜索过 issue,没有类似的问题,或者类似的问题仍然没有解决方案。
+ [x] 我已经搜索过[文档](https://elemefe.github.io/react-amap/articles/start),并且仍然没有找到解决方案。
+ [x] 我写了个问题重现的例子,链接或者代码将会贴在下面。

#### Reproduce Example Link or Code Fragment
React 16.3.1
react-amap 1.2.7

amap version:1.4.4
```
import React from 'react'
import { Map, Polygon, PolyEditor } from 'react-amap';

export default class PageTest extends React.Component {
constructor(p, c) {
super(p, c)
this.mapCenter = {longitude: 145, latitude: 30 }
this.linePath = [
{longitude: 150, latitude: 20 },
{longitude: 170, latitude: 20 },
{longitude: 150, latitude: 30 },
];
this.polygonPath = [
{longitude: 120, latitude: 30 },
{longitude: 130, latitude: 30 },
{longitude: 120, latitude: 40 },
];
this.state = {
polygonActive: true
}
}

render() {
return (









{ this.togglePolygon() }} >Toggle Polygon Editable

)
}

togglePolygon(){
this.setState({
polygonActive: !this.state.polygonActive
});
}
}
```

#### What is Expected?
希望多边形会显示出PolyEditor,并且调整编辑

#### What is actually happening?
PolyEditor未出现,且尝试过传入created事件,也没有执行。

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.