Skip to content

Commit

Permalink
fix: #33 #34 地图center取值错误
Browse files Browse the repository at this point in the history
  • Loading branch information
JserWang committed Aug 14, 2018
1 parent 4fc1041 commit 1049160
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/components/Map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ var Map = (_temp = _class = function (_React$Component) {
(0, _util.processBooleanOptions)(map, 'MAP_BOOLEAN_OPTIONS', props);

if (props.center) {
var center = props.center.center;
var center = props.center;

if ((0, _util.isPoint)(center)) {
center = (0, _util.getPoint)(center.lng, center.lat);
Expand Down
2 changes: 1 addition & 1 deletion lib/components/_base/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function bindEvents(target, eventKey, events) {
}

function unBindEvents(target) {
var events = target.events.events;
var events = target.events;

if (events) {
var eventNames = Object.keys(events);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-bmap",
"version": "0.1.6",
"version": "0.1.7",
"main": "lib/index.js",
"typings": "types/index.d.ts",
"repository": {
Expand Down Expand Up @@ -51,4 +51,4 @@
"webpack": "^3.0.0",
"webpack-dev-server": "^2.5.0"
}
}
}
2 changes: 1 addition & 1 deletion src/components/Map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default class Map extends React.Component {
processBooleanOptions(map, 'MAP_BOOLEAN_OPTIONS', props);

if (props.center) {
let { center } = props.center;
let { center } = props;
if (isPoint(center)) {
center = getPoint(center.lng, center.lat);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/_base/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function bindEvents(target, eventKey, events) {
}

export function unBindEvents(target) {
const { events } = target.events;
const { events } = target;
if (events) {
const eventNames = Object.keys(events);
for (let i = 0; i < eventNames.length; i += 1) {
Expand Down

0 comments on commit 1049160

Please sign in to comment.