Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions dist/GoogleApiComponent.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports', 'react', 'react-dom', './lib/ScriptCache', './lib/GoogleApi'], factory);
define(['exports', 'react', './lib/ScriptCache', './lib/GoogleApi'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('react'), require('react-dom'), require('./lib/ScriptCache'), require('./lib/GoogleApi'));
factory(exports, require('react'), require('./lib/ScriptCache'), require('./lib/GoogleApi'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.react, global.reactDom, global.ScriptCache, global.GoogleApi);
factory(mod.exports, global.react, global.ScriptCache, global.GoogleApi);
global.GoogleApiComponent = mod.exports;
}
})(this, function (exports, _react, _reactDom, _ScriptCache, _GoogleApi) {
})(this, function (exports, _react, _ScriptCache, _GoogleApi) {
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand All @@ -20,8 +20,6 @@

var _react2 = _interopRequireDefault(_react);

var _reactDom2 = _interopRequireDefault(_reactDom);

var _GoogleApi2 = _interopRequireDefault(_GoogleApi);

function _interopRequireDefault(obj) {
Expand Down Expand Up @@ -78,8 +76,6 @@
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
}

var defaultMapConfig = {};

var serialize = function serialize(obj) {
return JSON.stringify(obj);
};
Expand Down Expand Up @@ -212,7 +208,7 @@
});

return _react2.default.createElement(
'div',
_react.Fragment,
null,
_react2.default.createElement(WrappedComponent, props),
_react2.default.createElement('div', { ref: 'map' })
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
zoomControl: _propTypes2.default.bool,
zoomControlOptions: _propTypes2.default.object,
mapTypeControl: _propTypes2.default.bool,
mapTypeControlOptions: _propTypes2.default.object,
mapTypeControlOptions: _propTypes2.default.bool,
scaleControl: _propTypes2.default.bool,
streetViewControl: _propTypes2.default.bool,
streetViewControlOptions: _propTypes2.default.object,
Expand Down Expand Up @@ -433,4 +433,4 @@
};

exports.default = Map;
});
});
3 changes: 2 additions & 1 deletion dist/lib/GoogleApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
v: googleVersion,
channel: channel,
language: language,
region: region
region: region,
onerror: 'ERROR_FUNCTION'
};

var paramStr = Object.keys(params).filter(function (k) {
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/String.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
return word.charAt(0).toUpperCase() + word.slice(1);
}).join('');
};
});
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
"postcss-loader": "^0.9.1",
"precss": "^1.4.0",
"prop-types": "^15.5.10",
"react": "^15.0.0",
"react": "16.2.0",
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
"react-dom": "16.2.0",
"react-github-fork-ribbon": "^0.5.1",
"react-router-dom": "^4.2.2",
"sinon": "^1.17.3",
Expand Down
9 changes: 3 additions & 6 deletions src/GoogleApiComponent.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import React, { Fragment } from 'react';

import {ScriptCache} from './lib/ScriptCache';
import GoogleApi from './lib/GoogleApi';

const defaultMapConfig = {};

const serialize = obj => JSON.stringify(obj);
const isSame = (obj1, obj2) => obj1 === obj2 || serialize(obj1) === serialize(obj2);

Expand Down Expand Up @@ -118,10 +115,10 @@ export const wrapper = input => WrappedComponent => {
});

return (
<div>
<Fragment>
<WrappedComponent {...props} />
<div ref="map" />
</div>
</Fragment>
);
}
}
Expand Down
Loading