mirror of https://gitee.com/antv-l7/antv-l7
feat(src) update version inteaction
This commit is contained in:
parent
11eb6f0690
commit
1fddda4c67
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7",
|
"name": "@antv/l7",
|
||||||
"version": "1.2.3",
|
"version": "1.3.0",
|
||||||
"description": "Large-scale WebGL-powered Geospatial Data Visualization",
|
"description": "Large-scale WebGL-powered Geospatial Data Visualization",
|
||||||
"main": "build/L7.js",
|
"main": "build/L7.js",
|
||||||
"browser": "build/L7-min.js",
|
"browser": "build/L7-min.js",
|
||||||
|
|
|
@ -28,8 +28,8 @@ export default class Scene extends Base {
|
||||||
|
|
||||||
_initEngine(mapContainer) {
|
_initEngine(mapContainer) {
|
||||||
this._engine = new Engine(mapContainer, this);
|
this._engine = new Engine(mapContainer, this);
|
||||||
this.registerMapEvent();
|
this.registerMapEvent(); // 和高德地图同步状态
|
||||||
this._engine.run();
|
// this._engine.run();
|
||||||
compileBuiltinModules();
|
compileBuiltinModules();
|
||||||
}
|
}
|
||||||
_initContoller() {
|
_initContoller() {
|
||||||
|
@ -53,13 +53,13 @@ export default class Scene extends Base {
|
||||||
const Map = new MapProvider(this._attrs);
|
const Map = new MapProvider(this._attrs);
|
||||||
Map.mixMap(this);
|
Map.mixMap(this);
|
||||||
this._container = Map.container;
|
this._container = Map.container;
|
||||||
this._markerContainier = Map.l7_marker_Container;
|
|
||||||
Map.on('mapLoad', () => {
|
Map.on('mapLoad', () => {
|
||||||
this.map = Map.map;
|
this.map = Map.map;
|
||||||
|
this._markerContainier = Map.l7_marker_Container;
|
||||||
this._initEngine(Map.renderDom);
|
this._initEngine(Map.renderDom);
|
||||||
Map.asyncCamera(this._engine);
|
Map.asyncCamera(this._engine);
|
||||||
this.initLayer();
|
this.initLayer();
|
||||||
// this._registEvents();
|
this._registEvents();
|
||||||
const hash = this.get('hash');
|
const hash = this.get('hash');
|
||||||
if (hash) {
|
if (hash) {
|
||||||
const Ctor = getInteraction('hash');
|
const Ctor = getInteraction('hash');
|
||||||
|
@ -174,14 +174,14 @@ export default class Scene extends Base {
|
||||||
// 地图状态变化时更新可视化渲染
|
// 地图状态变化时更新可视化渲染
|
||||||
registerMapEvent() {
|
registerMapEvent() {
|
||||||
this._updateRender = () => this._engine.update();
|
this._updateRender = () => this._engine.update();
|
||||||
this.map.on('mousemove', this._updateRender);
|
// this.map.on('mousemove', this._updateRender);
|
||||||
// this.map.on('mapmove', this._updateRender);
|
this.map.on('mapmove', this._updateRender);
|
||||||
this.map.on('camerachange', this._updateRender);
|
this.map.on('camerachange', this._updateRender);
|
||||||
}
|
}
|
||||||
|
|
||||||
unRegsterMapEvent() {
|
unRegsterMapEvent() {
|
||||||
this.map.off('mousemove', this._updateRender);
|
// this.map.off('mousemove', this._updateRender);
|
||||||
// this.map.off('mapmove', this._updateRender);
|
this.map.off('mapmove', this._updateRender);
|
||||||
this.map.off('camerachange', this._updateRender);
|
this.map.off('camerachange', this._updateRender);
|
||||||
}
|
}
|
||||||
// control
|
// control
|
||||||
|
|
|
@ -9,8 +9,10 @@ export default class Active extends Interaction {
|
||||||
}
|
}
|
||||||
process(ev) {
|
process(ev) {
|
||||||
this.layer._addActiveFeature(ev);
|
this.layer._addActiveFeature(ev);
|
||||||
|
this.layer.scene._engine.update();
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.layer._resetStyle();
|
this.layer._resetStyle();
|
||||||
|
this.layer.scene._engine.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,6 @@ export default class Select extends Interaction {
|
||||||
}
|
}
|
||||||
process(ev) {
|
process(ev) {
|
||||||
this.layer._addActiveFeature(ev);
|
this.layer._addActiveFeature(ev);
|
||||||
|
this.layer.scene._engine.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue