이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== anchor 속성 가이드====== 컴포넌트의 anchor 속성에 대한 예시 화면이다. anchor API 관련으로 getleft, gettop, getright, getbottom API가 제공된다. ===== anchor 속성 예시 ===== ※ 패널 resize_dir 속성이 3:both, 화면 크기 변경시 패널 크기 변경에 따른, 패널내 버튼이 anchor 속성 기준으로 위치가 변경됨 ※ 버튼 클릭시 위치 지정 좌표 정보가 표시 됨 템플릿 위치: /HTML5/COMPONENT/COMMON/anchor_basic 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/COMMON/anchor_basic.xml|anchor_basic.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/COMMON/anchor_basic.js|anchor_basic.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/COMMON/anchor_basic|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/COMMON/anchor_basic"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // 화면내 버튼 클릭 공통 이벤트 함수 function btn_anchor_on_click(objInst) { // 컴포넌트 위치 정보 표시 screen.alert("NAME = " + objInst.getname() + "\nLEFT(부모 기준) = " + objInst.getleft() + "\nTOP(부모 기준) = " + objInst.gettop() + "\nRIGHT(부모 기준) = " + objInst.getright(true) + "\nRIGHT(컴포넌트 좌측 기준) = " + objInst.getright() + "\nBOTTOM(부모 기준) = " + objInst.getbottom(true) + "\nBOTTOM(컴포넌트 상단 기준) = " + objInst.getbottom()); } </sxh> guide/component/common/anchor_basic.txt 마지막으로 수정됨: 2023/08/21 14:16저자 127.0.0.1