Param |
Method |
Event |
|
|
CE_OnCustomMenuv1.6 higherParams의 AddMenu로 추가된 Custom 메뉴가 선택되었을 때 발생하는 이벤트입니다.
Syntaxvoid CE_OnCustomMenu ( Parameters[out] 이벤트 발생 시 아래와 같은 객체를 반환 합니다.
Remarks크로스에디터의 Main class 호출 후 에디터가 로드된 다음 메소드를 실행해야 정상적으로 실행이 됩니다. 발생한 이벤트 type이 custommenu_plugin일 경우 return 값으로 사용자가 생성한 플러그인 객체를 넘겨주어야 크로스에디터와 연동이 됩니다.
Sample Codes<Plugin>
JavaScript function CE_OnCustomMenu(e){ if (!e) return; if (e.type == 'custommenu_plugin' && e.customMenuID == ‘userMenu’){ //레이어가 위치 할 포지션 지정 document.getElementById(CustomLayer).style.top=e.customMenuY; document.getElementById(CustomLayer).style.left=e.customMenuX; document.getElementById("CustomLayer").style.display = ""; return document.getElementById("CustomLayer"); } }
<Function> JavaScript function CE_OnCustomMenu(e){ if (!e) return; if (e.type=='custommenu_function' && e.customMenuID == ‘userMenu’){ //실행할 스크립트 구문 alert(“ID : ” + e.customMenuID + “\n” + “Type : ” + e.type); } }
|