화면 » Event

on_click

Description

화면에서 마우스 왼쪽 버튼을 눌렀을 때 호출되는 이벤트이다.

Return Value

Type Description
void

Example

/**
 * 화면 마우스 좌측 버튼 클릭 이벤트
 * 컴포넌트가 아닌, 화면 영역 클릭시 발생한다.
 * factory.getmouseeventpos API 호출을 통해서 이벤트에 대한 상세한 정보를 구할 수 있다.
 */
function screen_on_click()
{
	factory.consoleprint("screen_on_click> start");

	var pos = factory.getmouseeventpos();

	factory.consoleprint("Offset: " + pos.offsetX + ", " + pos.offsetY);
	factory.consoleprint("Client: " + pos.clientX + ", " + pos.clientY);
	factory.consoleprint("Page: " + pos.pageX + ", " + pos.pageY);
	factory.consoleprint("Screen: " + pos.screenX + ", " + pos.screenY);
	factory.consoleprint("AltKey: " + pos.altKey);
	factory.consoleprint("CtrlKey: " + pos.ctrlKey);
	factory.consoleprint("ShiftKey: " + pos.shiftKey);
}

See Also

on_rclick

Viewer Ver.

9.1.1.1

Update Date

20230508