-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d275f30
commit 2d6a8d7
Showing
12 changed files
with
233 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
UI_EVENT_MAP, | ||
UI_EVENT_OBJECT, | ||
UI_EVENT_INFOWINDOW, | ||
} from "./eventList"; | ||
|
||
export function addEvent(emit: any, target: any, name: string) { | ||
window.naver.maps.Event.addListener(target, name, (event) => { | ||
emit(name, event); | ||
}); | ||
} | ||
|
||
export function addEventMap(emit: any, target: naver.maps.Map) { | ||
UI_EVENT_MAP.forEach((name) => addEvent(emit, target, name)); | ||
} | ||
|
||
export function addEventMarker(emit: any, target: naver.maps.Marker) { | ||
UI_EVENT_OBJECT.forEach((name) => addEvent(emit, target, name)); | ||
} | ||
export function addEventInfoWindow(emit: any, target: naver.maps.InfoWindow) { | ||
UI_EVENT_INFOWINDOW.forEach((name) => addEvent(emit, target, name)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** | ||
* Naver Mouse UI Event | ||
*/ | ||
export const UI_EVENT_MOUSE = [ | ||
"mousedown", | ||
"mouseup", | ||
"click", | ||
"dblclick", | ||
"rightclick", | ||
"mouseover", | ||
"mouseout", | ||
"mousemove", | ||
]; | ||
/** | ||
* Naver Drag UI Event | ||
*/ | ||
export const UI_EVENT_DRAG = ["dragstart", "drag", "dragend"]; | ||
/** | ||
* Naver Touch UI Event | ||
*/ | ||
export const UI_EVENT_TOUCH = [ | ||
"touchstart", | ||
"touchmove", | ||
"touchend", | ||
"pinchstart", | ||
"pinch", | ||
"pinchend", | ||
"tap", | ||
"longtap", | ||
"twofingertap", | ||
"doubletap", | ||
]; | ||
|
||
/** | ||
* Naver Object UI Event | ||
*/ | ||
export const UI_EVENT_OBJECT = [ | ||
...UI_EVENT_MOUSE, | ||
...UI_EVENT_DRAG, | ||
...UI_EVENT_TOUCH, | ||
]; | ||
|
||
/** | ||
* Naver Map UI Event | ||
*/ | ||
export const UI_EVENT_MAP = [ | ||
...UI_EVENT_OBJECT, | ||
"addLayer", | ||
"bounds_changed", | ||
"center_changed", | ||
"centerPoint_changed", | ||
"idle", | ||
"init_stylemap", | ||
"keydown", | ||
"keyup", | ||
"mapType_changed", | ||
"mapTypeId_changed", | ||
"panning", | ||
"projection_changed", | ||
"removeLayer", | ||
"resize", | ||
"size_changed", | ||
"tilesloaded", | ||
"zoom_changed", | ||
"zooming", | ||
]; | ||
|
||
/** | ||
* Naver InfoWindow UI Event | ||
*/ | ||
export const UI_EVENT_INFOWINDOW = [ | ||
"anchorColor_changed", | ||
"anchorSize_changed", | ||
"anchorSkew_changed", | ||
"backgroundColor_changed", | ||
"borderColor_changed", | ||
"borderWidth_changed", | ||
"close", | ||
"content_changed", | ||
"disableAnchor_changed", | ||
"disableAutoPan_changed", | ||
"maxWidth_changed", | ||
"open", | ||
"pixelOffset_changed", | ||
"position_changed", | ||
"zIndex_changed", | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from "./map"; | ||
export * from "./event"; | ||
export * from "./eventAction"; | ||
export * from "./eventList"; |