Merge branch 'source' of https://github.com/antvis/L7 into source

This commit is contained in:
thinkinggis 2019-12-07 21:10:16 +08:00
commit 693738e6c9
4 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,3 @@
import '@storybook/addon-actions/register';
// import '@storybook/addon-actions/register';
import '@storybook/addon-notes/register';
import '@storybook/addon-storysource/register';

View File

@ -1,6 +1,6 @@
// tslint:disable-next-line:no-submodule-imports
import '!style-loader!css-loader!sass-loader!./iframe.scss';
import '@storybook/addon-console';
// import '@storybook/addon-console';
import { addParameters, configure } from '@storybook/react';
import { create } from '@storybook/theming';

View File

@ -50,7 +50,7 @@
"clean-webpack-plugin": "^0.1.19",
"commitizen": "^4.0.3",
"copy-webpack-plugin": "^4.5.2",
"core-js": "3",
"core-js": "^3.4.7",
"coveralls": "^3.0.7",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",

View File

@ -151,7 +151,10 @@ export default class Scene extends EventEmitter implements ISceneService {
this.$container = $container;
if ($container) {
await this.rendererService.init($container);
elementResizeEvent(this.$container, this.handleWindowResized);
elementResizeEvent(
this.$container as HTMLDivElement,
this.handleWindowResized,
);
// window.addEventListener('resize', this.handleWindowResized, false);
} else {
this.logger.error('容器 id 不存在');
@ -214,7 +217,7 @@ export default class Scene extends EventEmitter implements ISceneService {
this.removeAllListeners();
this.rendererService.destroy();
this.map.destroy();
unbind(this.$container);
unbind(this.$container as HTMLDivElement, this.handleWindowResized);
// window.removeEventListener('resize', this.handleWindowResized, false);
}