style: error word

This commit is contained in:
thinkinggis 2020-02-12 14:49:47 +08:00
parent 2d98a6be4d
commit 924fd1337c
4 changed files with 28 additions and 28 deletions

View File

@ -252,32 +252,32 @@ export default class Marker extends EventEmitter {
element.addEventListener('click', (e: MouseEvent) => { element.addEventListener('click', (e: MouseEvent) => {
this.onMapClick(e); this.onMapClick(e);
}); });
element.addEventListener('click', this.eventHander); element.addEventListener('click', this.eventHandle);
applyAnchorClass(element, anchor, 'marker'); applyAnchorClass(element, anchor, 'marker');
} }
private registerMarkerEvent(element: HTMLElement) { private registerMarkerEvent(element: HTMLElement) {
element.addEventListener('mousemove', this.eventHander); element.addEventListener('mousemove', this.eventHandle);
element.addEventListener('click', this.eventHander); element.addEventListener('click', this.eventHandle);
element.addEventListener('mousedown', this.eventHander); element.addEventListener('mousedown', this.eventHandle);
element.addEventListener('mouseup', this.eventHander); element.addEventListener('mouseup', this.eventHandle);
element.addEventListener('dblclick', this.eventHander); element.addEventListener('dblclick', this.eventHandle);
element.addEventListener('contextmenu', this.eventHander); element.addEventListener('contextmenu', this.eventHandle);
element.addEventListener('mouseover', this.eventHander); element.addEventListener('mouseover', this.eventHandle);
element.addEventListener('mouseout', this.eventHander); element.addEventListener('mouseout', this.eventHandle);
} }
private unRegisterMarkerEvent() { private unRegisterMarkerEvent() {
const element = this.getElement(); const element = this.getElement();
element.removeEventListener('mousemove', this.eventHander); element.removeEventListener('mousemove', this.eventHandle);
element.removeEventListener('click', this.eventHander); element.removeEventListener('click', this.eventHandle);
element.removeEventListener('mousedown', this.eventHander); element.removeEventListener('mousedown', this.eventHandle);
element.removeEventListener('mouseup', this.eventHander); element.removeEventListener('mouseup', this.eventHandle);
element.removeEventListener('dblclick', this.eventHander); element.removeEventListener('dblclick', this.eventHandle);
element.removeEventListener('contextmenu', this.eventHander); element.removeEventListener('contextmenu', this.eventHandle);
element.removeEventListener('mouseover', this.eventHander); element.removeEventListener('mouseover', this.eventHandle);
element.removeEventListener('mouseout', this.eventHander); element.removeEventListener('mouseout', this.eventHandle);
} }
private eventHander = (e: MouseEvent) => { private eventHandle = (e: MouseEvent) => {
this.emit(e.type, { this.emit(e.type, {
target: e, target: e,
data: this.markerOption.extData, data: this.markerOption.extData,

View File

@ -165,10 +165,10 @@ export interface ILayer {
/** /**
* *
*/ */
on(type: string, hander: (...args: any[]) => void): void; on(type: string, handler: (...args: any[]) => void): void;
off(type: string, hander: (...args: any[]) => void): void; off(type: string, handler: (...args: any[]) => void): void;
emit(type: string, hander: unknown): void; emit(type: string, handler: unknown): void;
once(type: string, hander: (...args: any[]) => void): void; once(type: string, handler: (...args: any[]) => void): void;
/** /**
* JSON Schema * JSON Schema
*/ */

View File

@ -75,11 +75,11 @@ export default class PixelPickingPass<
this.interactionService.on(InteractionEvent.Hover, this.pickFromPickingFBO); this.interactionService.on(InteractionEvent.Hover, this.pickFromPickingFBO);
this.interactionService.on( this.interactionService.on(
InteractionEvent.Select, InteractionEvent.Select,
this.selectFeatureHander.bind(this), this.selectFeatureHandle.bind(this),
); );
this.interactionService.on( this.interactionService.on(
InteractionEvent.Active, InteractionEvent.Active,
this.highlightFeatureHander.bind(this), this.highlightFeatureHandle.bind(this),
); );
} }
@ -259,12 +259,12 @@ export default class PixelPickingPass<
this.layerService.renderLayers(); this.layerService.renderLayers();
} }
private selectFeatureHander({ featureId }: Partial<IInteractionTarget>) { private selectFeatureHandle({ featureId }: Partial<IInteractionTarget>) {
const pickedColors = encodePickingColor(featureId as number); const pickedColors = encodePickingColor(featureId as number);
this.selectFeature(new Uint8Array(pickedColors)); this.selectFeature(new Uint8Array(pickedColors));
} }
private highlightFeatureHander({ featureId }: Partial<IInteractionTarget>) { private highlightFeatureHandle({ featureId }: Partial<IInteractionTarget>) {
const pickedColors = encodePickingColor(featureId as number); const pickedColors = encodePickingColor(featureId as number);
this.highlightPickedFeature(new Uint8Array(pickedColors)); this.highlightPickedFeature(new Uint8Array(pickedColors));
} }

View File

@ -3,8 +3,8 @@ import { IMapConfig } from '../map/IMapService';
import { IRenderConfig } from '../renderer/IRendererService'; import { IRenderConfig } from '../renderer/IRendererService';
export interface ISceneService { export interface ISceneService {
on(type: string, hander: (...args: any[]) => void): void; on(type: string, handle: (...args: any[]) => void): void;
off(type: string, hander: (...args: any[]) => void): void; off(type: string, handle: (...args: any[]) => void): void;
removeAllListeners(event?: string): this; removeAllListeners(event?: string): this;
init(config: IMapConfig & IRenderConfig): void; init(config: IMapConfig & IRenderConfig): void;
addLayer(layer: ILayer): void; addLayer(layer: ILayer): void;