react-google-maps
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,10 @@ | ||
### 1.1.2 (2015-05-06) | ||
#### Bug Fixes | ||
* **GoogleMaps:** constructor should use spread operator ([d8e30af6](https://github.com/tomchentw/react-google-maps/commit/d8e30af69dc411cc5a2d5f8cb0239a4669b1c693)) | ||
* **SimpleChildComponent:** prevent removal of child during update ([834d399b](https://github.com/tomchentw/react-google-maps/commit/834d399b3c39045d8406b5db50edf4618aa2b67a)) | ||
### 1.1.1 (2015-05-01) | ||
@@ -2,0 +11,0 @@ |
@@ -12,3 +12,3 @@ "use strict"; | ||
this.serverMarkupPath = options.serverMarkupPath; | ||
this.htmlOutputPath = options.htmlOutputPath; | ||
this.htmlOutputFilename = options.htmlOutputFilename; | ||
@@ -38,4 +38,5 @@ if ("string" !== typeof options.htmlDoctype) { | ||
IsomorphicReactPluginFactory.prototype.receivedServerEmit = function (serverAssets, done) { | ||
this.serverAssets = serverAssets; | ||
IsomorphicReactPluginFactory.prototype.receivedServerEmit = function (compilation, done) { | ||
this.htmlOutputPath = compilation.getPath(this.htmlOutputFilename) | ||
this.serverAssets = compilation.assets; | ||
this.done = done; | ||
@@ -99,3 +100,2 @@ if (this.clientAssets) { | ||
this.pluginFactory.receivedClientAssets(assets); | ||
done(); | ||
@@ -112,3 +112,3 @@ }).bind(this)); | ||
this.pluginFactory.receivedServerEmit(compilation.assets, done); | ||
this.pluginFactory.receivedServerEmit(compilation, done); | ||
}).bind(this)); | ||
@@ -120,5 +120,5 @@ } | ||
// Shamelessly stolen from html-webpack-plugin - Thanks @ampedandwired :) | ||
function getAssetsFromCompilation (compiler) { | ||
function getAssetsFromCompilation (compilation) { | ||
var assets = {}; | ||
var webpackStatsJson = compiler.getStats().toJson(); | ||
var webpackStatsJson = compilation.getStats().toJson(); | ||
for (var chunk in webpackStatsJson.assetsByChunkName) { | ||
@@ -133,6 +133,3 @@ var chunkValue = webpackStatsJson.assetsByChunkName[chunk]; | ||
if (compiler.options.output.publicPath) { | ||
chunkValue = compiler.options.output.publicPath + chunkValue; | ||
} | ||
assets[chunk] = chunkValue; | ||
assets[chunk] = (webpackStatsJson.publicPath || "") + chunkValue; | ||
} | ||
@@ -139,0 +136,0 @@ return assets; |
@@ -16,2 +16,3 @@ { | ||
"eval": "^0.1.0", | ||
"extract-text-webpack-plugin": "^0.7.0", | ||
"file-loader": "^0.8.1", | ||
@@ -18,0 +19,0 @@ "github-fork-ribbon-css": "git+https://github.com/tomchentw/github-fork-ribbon-css.git#gh-pages", |
@@ -7,2 +7,10 @@ import React from "react"; | ||
_render_link_to_stylesheet_ (clientAssets) { | ||
if (clientAssets["client"]) { | ||
return ( | ||
<link rel="stylesheet" href={clientAssets["client"].replace(/js$/, "css")} /> | ||
); | ||
} | ||
} | ||
render () { | ||
@@ -17,2 +25,3 @@ const {props, state} = this, | ||
<title>React Google Maps | tomchentw</title> | ||
{this._render_link_to_stylesheet_(clientAssets)} | ||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp" /> | ||
@@ -23,3 +32,3 @@ <script type="text/javascript" src="prism.min.js" /> | ||
<div id="react-container" dangerouslySetInnerHTML={innerHtml} /> | ||
<script type="text/javascript" src={clientAssets["assets/main"]} /> | ||
<script type="text/javascript" src={clientAssets["assets/client"] || clientAssets["client"]} /> | ||
</body> | ||
@@ -26,0 +35,0 @@ </html> |
@@ -8,4 +8,6 @@ "use strict"; | ||
React = require("react"), | ||
ExtractTextPlugin = require("extract-text-webpack-plugin"), | ||
IsomorphicReactPluginFactory = require("./IsomorphicReactPluginFactory"), | ||
isomorphicReactPlugin, | ||
outputPath = Path.resolve(__dirname, "../../public"), | ||
clientConfig, | ||
@@ -16,5 +18,7 @@ serverConfig, | ||
IS_PRODUCTION = "production" === process.env.NODE_ENV, | ||
IS_DEVELOPMENT = !IS_PRODUCTION, | ||
BABEL_LOADER = "babel-loader?stage=1", | ||
CSS_LOADER = "style-loader!css-loader?root=../", | ||
SCSS_LOADER = CSS_LOADER + "!sass-loader?" + JSON.stringify({ | ||
STYLE_LOADER = "style-loader", | ||
CSS_LOADER = "css-loader?root=../", | ||
SASS_LOADER = CSS_LOADER + "!sass-loader?" + JSON.stringify({ | ||
includePaths: [ | ||
@@ -26,5 +30,5 @@ Path.resolve(__dirname, "./node_modules/bootstrap-sass/assets/stylesheets"), | ||
isomorphicReactPlugin = new IsomorphicReactPluginFactory({ | ||
serverComponentPath: "tmp/main.js", | ||
serverComponentPath: "tmp/server.js", | ||
serverMarkupPath: "tmp/html.js", | ||
htmlOutputPath: "index.html", | ||
htmlOutputFilename: "index.html", | ||
}); | ||
@@ -34,6 +38,6 @@ | ||
entry: { | ||
"assets/main": "./scripts/client.js", | ||
"assets/client": "./scripts/client.js", | ||
}, | ||
output: { | ||
path: Path.resolve(__dirname, "../../public"), | ||
path: outputPath, | ||
filename: "[name].js", | ||
@@ -55,7 +59,6 @@ }, | ||
exclude: /node_modules/, | ||
loaders: ["react-hot-loader", BABEL_LOADER], | ||
loaders: [BABEL_LOADER], | ||
}, | ||
{ test: /\.jpg$/, loader: "file-loader" }, | ||
{ test: /\.css$/, loader: CSS_LOADER }, | ||
{ test: /\.scss$/, loader: SCSS_LOADER }, | ||
{ test: /\.scss$/, loader: ExtractTextPlugin.extract(STYLE_LOADER, SASS_LOADER) }, | ||
], | ||
@@ -68,2 +71,5 @@ }, | ||
}), | ||
new ExtractTextPlugin("[name].css", { | ||
disable: IS_DEVELOPMENT, | ||
}), | ||
isomorphicReactPlugin.clientPlugin, | ||
@@ -73,9 +79,3 @@ ], | ||
if (IS_PRODUCTION) { | ||
clientConfig.output.filename = "assets/[hash].js"; | ||
clientConfig.plugins.push( | ||
new webpack.optimize.DedupePlugin() | ||
); | ||
} else { | ||
if (IS_DEVELOPMENT) { | ||
// http://webpack.github.io/docs/hot-module-replacement-with-webpack.html#tutorial | ||
@@ -89,5 +89,19 @@ Object.keys(clientConfig.entry).forEach(function (key) { | ||
clientConfig.module.loaders[0].loaders.unshift("react-hot-loader"); | ||
clientConfig.plugins.push( | ||
new webpack.HotModuleReplacementPlugin() | ||
) | ||
} else { | ||
clientConfig.entry = Object.keys(clientConfig.entry).reduce(function (acc, key) { | ||
acc[key.replace(/^assets\//, "")] = clientConfig.entry[key]; | ||
return acc; | ||
}, {}); | ||
clientConfig.output.publicPath = "assets/[hash]/"; | ||
clientConfig.output.path = Path.resolve(outputPath, "./" + clientConfig.output.publicPath); | ||
clientConfig.plugins.push( | ||
new webpack.optimize.DedupePlugin() | ||
); | ||
} | ||
@@ -97,7 +111,7 @@ | ||
entry: { | ||
"tmp/main": "./scripts/server.js", | ||
"tmp/server": "./scripts/server.js", | ||
"tmp/html": "./scripts/html.js", | ||
}, | ||
output: { | ||
path: Path.resolve(__dirname, "../../public"), | ||
path: outputPath, | ||
filename: "[name].js", | ||
@@ -139,2 +153,6 @@ library: true, | ||
webpackConfigsArray.devServer = { | ||
hot: IS_DEVELOPMENT, | ||
}; | ||
module.exports = webpackConfigsArray; |
@@ -7,15 +7,15 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
@@ -34,9 +34,9 @@ var Circle = (function (_SimpleChildComponent) { | ||
return Circle; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
Circle._GoogleMapsClassName = "Circle"; | ||
Circle._registerEvents = _createRegisterEvents2["default"]("center_changed click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup radius_changed rightclick"); | ||
Circle._registerEvents = _internalsCreateRegisterEvents2["default"]("center_changed click dblclick drag dragend dragstart mousedown mousemove mouseout mouseover mouseup radius_changed rightclick"); | ||
exports["default"] = Circle; | ||
module.exports = exports["default"]; |
@@ -7,19 +7,19 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
var _BASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _internalsBASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _BASIC_EVENT_NAMES2 = _interopRequireDefault(_BASIC_EVENT_NAMES); | ||
var _internalsBASIC_EVENT_NAMES2 = _interopRequireDefault(_internalsBASIC_EVENT_NAMES); | ||
@@ -38,9 +38,9 @@ var DirectionsRenderer = (function (_SimpleChildComponent) { | ||
return DirectionsRenderer; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
DirectionsRenderer._GoogleMapsClassName = "DirectionsRenderer"; | ||
DirectionsRenderer._registerEvents = _createRegisterEvents2["default"](_BASIC_EVENT_NAMES2["default"]); | ||
DirectionsRenderer._registerEvents = _internalsCreateRegisterEvents2["default"](_internalsBASIC_EVENT_NAMES2["default"]); | ||
exports["default"] = DirectionsRenderer; | ||
module.exports = exports["default"]; |
@@ -7,8 +7,2 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -20,28 +14,34 @@ | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _React = require("react"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _React2 = _interopRequireDefault(_React); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _EventComponent2 = require("./internals/EventComponent"); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _EventComponent3 = _interopRequireDefault(_EventComponent2); | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _VirtualContainer = require("./internals/VirtualContainer"); | ||
var _react = require("react"); | ||
var _VirtualContainer2 = _interopRequireDefault(_VirtualContainer); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _exposeGetters = require("./internals/exposeGetters"); | ||
var _internalsEventComponent = require("./internals/EventComponent"); | ||
var _exposeGetters2 = _interopRequireDefault(_exposeGetters); | ||
var _internalsEventComponent2 = _interopRequireDefault(_internalsEventComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsVirtualContainer = require("./internals/VirtualContainer"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsVirtualContainer2 = _interopRequireDefault(_internalsVirtualContainer); | ||
var PropTypes = _React2["default"].PropTypes; | ||
var _internalsExposeGetters = require("./internals/exposeGetters"); | ||
var _internalsExposeGetters2 = _interopRequireDefault(_internalsExposeGetters); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
var PropTypes = _react2["default"].PropTypes; | ||
var GoogleMaps = (function (_EventComponent) { | ||
@@ -52,6 +52,10 @@ /* | ||
function GoogleMaps(props) { | ||
function GoogleMaps() { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_classCallCheck(this, GoogleMaps); | ||
_get(Object.getPrototypeOf(GoogleMaps.prototype), "constructor", this).call(this, props); | ||
_get(Object.getPrototypeOf(GoogleMaps.prototype), "constructor", this).apply(this, args); | ||
this.state = {}; | ||
@@ -124,4 +128,4 @@ } | ||
var GoogleMapsClass = googleMapsApi.Map; | ||
instance = new GoogleMapsClass(_React2["default"].findDOMNode(this.refs.googleMaps), googleMapsConfig); | ||
_exposeGetters2["default"](this, GoogleMapsClass.prototype, instance); | ||
instance = new GoogleMapsClass(_react2["default"].findDOMNode(this.refs.googleMaps), googleMapsConfig); | ||
_internalsExposeGetters2["default"](this, GoogleMapsClass.prototype, instance); | ||
@@ -148,3 +152,3 @@ this.setState({ instance: instance }); | ||
value: function componentWillUnmount() { | ||
_React2["default"].unmountComponentAtNode(this._containerNode); | ||
_react2["default"].unmountComponentAtNode(this._containerNode); | ||
this._containerNode = null; | ||
@@ -158,3 +162,3 @@ _get(Object.getPrototypeOf(GoogleMaps.prototype), "componentWillUnmount", this).call(this); | ||
return _React2["default"].createElement("div", _extends({}, props.containerProps, { ref: "googleMaps" })); | ||
return _react2["default"].createElement("div", _extends({}, props.containerProps, { ref: "googleMaps" })); | ||
} | ||
@@ -171,4 +175,4 @@ }, { | ||
} | ||
return _React2["default"].render(_React2["default"].createElement( | ||
_VirtualContainer2["default"], | ||
return _react2["default"].render(_react2["default"].createElement( | ||
_internalsVirtualContainer2["default"], | ||
{ | ||
@@ -183,10 +187,10 @@ googleMapsApi: googleMapsApi, | ||
return GoogleMaps; | ||
})(_EventComponent3["default"]); | ||
})(_internalsEventComponent2["default"]); | ||
GoogleMaps.propTypes = _extends({}, _EventComponent3["default"].propTypes, { | ||
GoogleMaps.propTypes = _extends({}, _internalsEventComponent2["default"].propTypes, { | ||
containerProps: PropTypes.object.isRequired }); | ||
GoogleMaps._registerEvents = _createRegisterEvents2["default"]("bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed"); | ||
GoogleMaps._registerEvents = _internalsCreateRegisterEvents2["default"]("bounds_changed center_changed click dblclick drag dragend dragstart heading_changed idle maptypeid_changed mousemove mouseout mouseover projection_changed resize rightclick tilesloaded tilt_changed zoom_changed"); | ||
exports["default"] = GoogleMaps; | ||
module.exports = exports["default"]; |
@@ -7,3 +7,3 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -10,0 +10,0 @@ var _GoogleMaps = require("./GoogleMaps"); |
@@ -7,8 +7,4 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -20,18 +16,22 @@ | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _React = require("react"); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _React2 = _interopRequireDefault(_React); | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _react = require("react"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var PropTypes = _React2["default"].PropTypes; | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
var PropTypes = _react2["default"].PropTypes; | ||
var InfoWindow = (function (_SimpleChildComponent) { | ||
@@ -60,5 +60,5 @@ function InfoWindow() { | ||
return InfoWindow; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
InfoWindow.propTypes = _extends({}, _SimpleChildComponent3["default"].propTypes, { | ||
InfoWindow.propTypes = _extends({}, _internalsSimpleChildComponent2["default"].propTypes, { | ||
anchor: PropTypes.object }); | ||
@@ -68,5 +68,5 @@ | ||
InfoWindow._registerEvents = _createRegisterEvents2["default"]("closeclick content_changed domready position_changed zindex_changed"); | ||
InfoWindow._registerEvents = _internalsCreateRegisterEvents2["default"]("closeclick content_changed domready position_changed zindex_changed"); | ||
exports["default"] = InfoWindow; | ||
module.exports = exports["default"]; |
@@ -7,6 +7,2 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -18,10 +14,14 @@ | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _React = require("react"); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _React2 = _interopRequireDefault(_React); | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var PropTypes = _React2["default"].PropTypes; | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var PropTypes = _react2["default"].PropTypes; | ||
function noop() {} | ||
@@ -37,6 +37,10 @@ | ||
function EventComponent(props) { | ||
function EventComponent() { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_classCallCheck(this, EventComponent); | ||
_get(Object.getPrototypeOf(EventComponent.prototype), "constructor", this).call(this, props); | ||
_get(Object.getPrototypeOf(EventComponent.prototype), "constructor", this).apply(this, args); | ||
@@ -88,3 +92,3 @@ this._unregisterEvents = noop; | ||
return EventComponent; | ||
})(_React2["default"].Component); | ||
})(_react2["default"].Component); | ||
@@ -91,0 +95,0 @@ EventComponent.propTypes = { |
@@ -7,10 +7,4 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
@@ -22,8 +16,14 @@ | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _React = require("react"); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _React2 = _interopRequireDefault(_React); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _EventComponent2 = require("./EventComponent"); | ||
@@ -37,3 +37,3 @@ | ||
var PropTypes = _React2["default"].PropTypes; | ||
var PropTypes = _react2["default"].PropTypes; | ||
@@ -48,6 +48,10 @@ var SimpleChildComponent = (function (_EventComponent) { | ||
function SimpleChildComponent(props) { | ||
function SimpleChildComponent() { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
_classCallCheck(this, SimpleChildComponent); | ||
_get(Object.getPrototypeOf(SimpleChildComponent.prototype), "constructor", this).call(this, props); | ||
_get(Object.getPrototypeOf(SimpleChildComponent.prototype), "constructor", this).apply(this, args); | ||
this.state = {}; | ||
@@ -75,4 +79,5 @@ } | ||
if (instance) { | ||
if (googleMapsConfig.map !== instance.getMap()) { | ||
instance.setMap(googleMapsConfig.map); | ||
if (googleMapsConfig.map === instance.getMap()) { | ||
// prevent it not to be removed first then be added later | ||
delete googleMapsConfig.map; | ||
} | ||
@@ -104,3 +109,3 @@ instance.setOptions(googleMapsConfig); | ||
return _React2["default"].createElement("noscript", null); | ||
return _react2["default"].createElement("noscript", null); | ||
} | ||
@@ -107,0 +112,0 @@ }]); |
@@ -7,13 +7,13 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _React = require("react"); | ||
var _react = require("react"); | ||
var _React2 = _interopRequireDefault(_React); | ||
var _react2 = _interopRequireDefault(_react); | ||
@@ -24,3 +24,3 @@ var _EventComponent = require("./EventComponent"); | ||
var PropTypes = _React2["default"].PropTypes; | ||
var PropTypes = _react2["default"].PropTypes; | ||
@@ -41,3 +41,3 @@ var VirtualContainer = (function (_React$Component) { | ||
value: function render() { | ||
return _React2["default"].createElement( | ||
return _react2["default"].createElement( | ||
"div", | ||
@@ -57,5 +57,5 @@ null, | ||
return _React2["default"].Children.map(props.children, function (child) { | ||
return _react2["default"].Children.map(props.children, function (child) { | ||
if (child && child.type) { | ||
child = _React2["default"].cloneElement(child, extraProps); | ||
child = _react2["default"].cloneElement(child, extraProps); | ||
} | ||
@@ -68,3 +68,3 @@ return child; | ||
return VirtualContainer; | ||
})(_React2["default"].Component); | ||
})(_react2["default"].Component); | ||
@@ -71,0 +71,0 @@ VirtualContainer.propTypes = { |
@@ -7,21 +7,21 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _React = require("react"); | ||
var _react = require("react"); | ||
var _React2 = _interopRequireDefault(_React); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
@@ -32,3 +32,3 @@ var _InfoWindow = require("./InfoWindow"); | ||
var Children = _React2["default"].Children; | ||
var Children = _react2["default"].Children; | ||
@@ -50,6 +50,6 @@ var Marker = (function (_SimpleChildComponent) { | ||
if (0 === Children.count(this.props.children)) { | ||
return _React2["default"].createElement("noscript", null); | ||
return _react2["default"].createElement("noscript", null); | ||
} | ||
return _React2["default"].createElement( | ||
return _react2["default"].createElement( | ||
"div", | ||
@@ -71,4 +71,4 @@ null, | ||
return Children.map(props.children, function (child) { | ||
if (_React2["default"].isValidElement(child) && child.type === _InfoWindow2["default"]) { | ||
child = _React2["default"].cloneElement(child, extraProps); | ||
if (_react2["default"].isValidElement(child) && child.type === _InfoWindow2["default"]) { | ||
child = _react2["default"].cloneElement(child, extraProps); | ||
} | ||
@@ -81,9 +81,9 @@ return child; | ||
return Marker; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
Marker._GoogleMapsClassName = "Marker"; | ||
Marker._registerEvents = _createRegisterEvents2["default"]("animation_changed click clickable_changed cursor_changed dblclick drag dragend draggable_changed dragstart flat_changed icon_changed mousedown mouseout mouseover mouseup position_changed rightclick shape_changed title_changed visible_changed zindex_changed"); | ||
Marker._registerEvents = _internalsCreateRegisterEvents2["default"]("animation_changed click clickable_changed cursor_changed dblclick drag dragend draggable_changed dragstart flat_changed icon_changed mousedown mouseout mouseover mouseup position_changed rightclick shape_changed title_changed visible_changed zindex_changed"); | ||
exports["default"] = Marker; | ||
module.exports = exports["default"]; |
@@ -7,19 +7,19 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
var _BASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _internalsBASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _BASIC_EVENT_NAMES2 = _interopRequireDefault(_BASIC_EVENT_NAMES); | ||
var _internalsBASIC_EVENT_NAMES2 = _interopRequireDefault(_internalsBASIC_EVENT_NAMES); | ||
@@ -38,9 +38,9 @@ var Polygon = (function (_SimpleChildComponent) { | ||
return Polygon; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
Polygon._GoogleMapsClassName = "Polygon"; | ||
Polygon._registerEvents = _createRegisterEvents2["default"](_BASIC_EVENT_NAMES2["default"]); | ||
Polygon._registerEvents = _internalsCreateRegisterEvents2["default"](_internalsBASIC_EVENT_NAMES2["default"]); | ||
exports["default"] = Polygon; | ||
module.exports = exports["default"]; |
@@ -7,19 +7,19 @@ "use strict"; | ||
var _interopRequireDefault = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; }; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
var _SimpleChildComponent2 = require("./internals/SimpleChildComponent"); | ||
var _internalsSimpleChildComponent = require("./internals/SimpleChildComponent"); | ||
var _SimpleChildComponent3 = _interopRequireDefault(_SimpleChildComponent2); | ||
var _internalsSimpleChildComponent2 = _interopRequireDefault(_internalsSimpleChildComponent); | ||
var _createRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _internalsCreateRegisterEvents = require("./internals/createRegisterEvents"); | ||
var _createRegisterEvents2 = _interopRequireDefault(_createRegisterEvents); | ||
var _internalsCreateRegisterEvents2 = _interopRequireDefault(_internalsCreateRegisterEvents); | ||
var _BASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _internalsBASIC_EVENT_NAMES = require("./internals/BASIC_EVENT_NAMES"); | ||
var _BASIC_EVENT_NAMES2 = _interopRequireDefault(_BASIC_EVENT_NAMES); | ||
var _internalsBASIC_EVENT_NAMES2 = _interopRequireDefault(_internalsBASIC_EVENT_NAMES); | ||
@@ -38,9 +38,9 @@ var Polyline = (function (_SimpleChildComponent) { | ||
return Polyline; | ||
})(_SimpleChildComponent3["default"]); | ||
})(_internalsSimpleChildComponent2["default"]); | ||
Polyline._GoogleMapsClassName = "Polyline"; | ||
Polyline._registerEvents = _createRegisterEvents2["default"](_BASIC_EVENT_NAMES2["default"]); | ||
Polyline._registerEvents = _internalsCreateRegisterEvents2["default"](_internalsBASIC_EVENT_NAMES2["default"]); | ||
exports["default"] = Polyline; | ||
module.exports = exports["default"]; |
{ | ||
"__template__gist__": "https://gist.github.com/tomchentw/368a93bb748ad9d576f1#file-package-json", | ||
"name": "react-google-maps", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "React.js Google Maps integration component", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -44,4 +44,4 @@ import React from "react"; | ||
*/ | ||
constructor (props) { | ||
super(props); | ||
constructor (...args) { | ||
super(...args); | ||
this.state = {}; | ||
@@ -48,0 +48,0 @@ } |
@@ -15,4 +15,4 @@ import React from "react"; | ||
*/ | ||
constructor (props) { | ||
super(props); | ||
constructor (...args) { | ||
super(...args); | ||
@@ -19,0 +19,0 @@ this._unregisterEvents = noop; |
@@ -15,4 +15,4 @@ import React from "react"; | ||
*/ | ||
constructor (props) { | ||
super(props); | ||
constructor (...args) { | ||
super(...args); | ||
this.state = {}; | ||
@@ -30,4 +30,5 @@ } | ||
if (instance) { | ||
if (googleMapsConfig.map !== instance.getMap()) { | ||
instance.setMap(googleMapsConfig.map); | ||
if (googleMapsConfig.map === instance.getMap()) { | ||
// prevent it not to be removed first then be added later | ||
delete googleMapsConfig.map; | ||
} | ||
@@ -34,0 +35,0 @@ instance.setOptions(googleMapsConfig); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
116121
2409
0