diff --git a/packages/core/src/services/interaction/InteractionService.ts b/packages/core/src/services/interaction/InteractionService.ts index 6bb0ff6d04..3e479b351b 100644 --- a/packages/core/src/services/interaction/InteractionService.ts +++ b/packages/core/src/services/interaction/InteractionService.ts @@ -81,11 +81,10 @@ export default class InteractionService extends EventEmitter // hammertime.get('pinch').set({ enable: true }); hammertime.on('dblclick click', this.onHammer); hammertime.on('panstart panmove panend pancancel', this.onDrag); - // hammertime.on('press pressup', this.onHammer); // $containter.addEventListener('touchstart', this.onTouch); $containter.addEventListener('mousemove', this.onHover); // $containter.addEventListener('click', this.onHover); - $containter.addEventListener('mousedown', this.onHover); + $containter.addEventListener('mousedown', this.onHover, true); $containter.addEventListener('mouseup', this.onHover); $containter.addEventListener('contextmenu', this.onHover); diff --git a/packages/l7/src/version.ts b/packages/l7/src/version.ts index ee02a2b5fa..9ca1c668fc 100644 --- a/packages/l7/src/version.ts +++ b/packages/l7/src/version.ts @@ -1,2 +1,2 @@ -const version = '2.3.4'; +const version = '2.3.5'; export { version }; diff --git a/stories/Layers/components/PointImage.tsx b/stories/Layers/components/PointImage.tsx index c5e8912836..04f8f70123 100644 --- a/stories/Layers/components/PointImage.tsx +++ b/stories/Layers/components/PointImage.tsx @@ -15,9 +15,9 @@ export default class PointImage extends React.Component { ); const scene = new Scene({ id: 'map', - map: new GaodeMap({ + map: new Mapbox({ center: [121.4, 31.258134], - zoom: 5, + zoom: 12, pitch: 0, style: 'normal', }), @@ -52,7 +52,6 @@ export default class PointImage extends React.Component { }, }) .shape('type', (v: any) => { - console.log(v); return v; }) // .shape('triangle') @@ -60,6 +59,12 @@ export default class PointImage extends React.Component { .active(false) .size(20); scene.addLayer(imageLayer); + imageLayer.on('mousedown', (e) => { + console.log('mousedown', e); + }); + imageLayer.on('click', (e) => { + console.log('click', e); + }); } public render() {