본문으로 건너뛰기

openPopover

openPopover

지정한 폼을 팝오버로 엽니다. 위젯 앵커에 고정하거나 화면 중앙에 표시할 수 있습니다.

파라미터

  • formPath (string): 팝오버에 표시할 폼의 경로 또는 ID
  • linkArg (any): 열린 폼으로 전달할 인수 (null 가능)
  • callback (function): 팝오버가 닫힐 때 결과값을 받는 콜백 (null 가능)
  • options (object, 선택): 팝오버 옵션

options 항목:

  • anchor (string): 앵커로 사용할 위젯 ID (생략 시 화면 중앙 배치)
  • placement (string): 배치 방향 — 'bottom-left', 'bottom-right', 'top-right', 'top-left', 'bottom', 'top', 'center'
  • offsetX / offsetY (number): 앵커 기준 미세 조정 오프셋
  • width / height (number): 팝오버 크기
  • barrierDismissible (boolean): 배경 탭으로 닫기 여부 (기본 true)
  • barrierColor (string): 배경 색상
  • barrierPassThrough (boolean): 배경 마우스 이벤트 통과 여부
  • movable (boolean): 팝오버 이동 가능 여부 (titleBarHeight와 함께 사용)
  • titleBarHeight (number): 이동 가능한 팝오버의 타이틀바 높이
  • snapToEdges (boolean): 화면 가장자리 스냅 여부
  • snapThreshold (number): 스냅 임계값

반환: 없음 (void)

Example

// 위젯에 앵커링
$form.openPopover("menus/orderType", null, function(result) {
$log.i("선택:", result);
}, { anchor: "btn_ordertype", placement: "bottom-left", offsetY: 4 });

// 화면 중앙 고정 크기
$form.openPopover("dialogs/picker", null, null,
{ width: 300, height: 400, barrierDismissible: true });

관련

  • $form.openHoverPopover(formPath, linkArg, callback, options) — 마우스 호버 팝오버
  • $form.closePopover(result) — 팝오버 닫기