팝업 트리거를 위한 옵션
추천0
페이지 정보
작성자 최고관리자 작성일 2020-03-31 00:00 조회 4,386회 댓글 0건본문
관련링크
Wijmo의 Popup 컨트롤을 통해 개발자는 팝업 및 대화 상자를 만들 수 있으며, 그러한 요소들은 드롭 다운 버튼과 같은 owner 요소로 제어할 수 있습니다. Popup 컨트롤은 action을 통해 팝업을 표시하고 사라지게 하는 showTrigger 및 hideTrigger 속성을 갖고 있습니다.
트리거 동작은 PopupTrigger 열거에 의해 정의되며, 이전 버전에서는 몇 가지 옵션만 제공했습니다.
export enum PopupTrigger {
/** No triggers; popups must be shown and hidden using code. */
None = 0,
/** Show or hide the popup when the owner element is clicked. */
Click = 1,
/** Hide the popup when it loses focus. */
Blur = 2,
/** Show or hide the popup when the owner element is clicked,
hide when it loses focus. */
ClickOrBlur = Click | Blur
}
일부 고객은 mouse over 및 mouse leave를 포함한 트리거 또는 Popup 및 팝업의 owner만을 타겟으로 하는 트리거를 추가해달라고 요청하였습니다.
개발팀은 Popup 컨트롤이 더 유연하고 강력하게 만드는 좋은 방법이라고 생각하여 PopupTrigger 열거를 약간 확장했습니다.
export enum PopupTrigger {
/** No triggers; popups must be shown and hidden using code. */
None = 0,
/** When the user clicks the owner element. */
ClickOwner = 1,
/** When the user clicks the popup. */
ClickPopup = 2,
/** When the user clicks the owner element or the popup. */
Click = ClickOwner | ClickPopup,
/** When the owner element loses focus. */
BlurOwner = 4,
/** When the popup loses focus. */
BlurPopup = 8,
/** When the owner element or the popup lose focus. */
Blur = BlurOwner | BlurPopup,
/** When the owner element or the popup are clicked or lose focus. */
ClickOrBlur = Click | Blur,
/** When the mouse button is pressed over the owner element. */
DownOwner = 16,
/** When the mouse button is pressed over the popup. */
DownPopup = 32,
/** When the mouse button is pressed over the owner element or the popup. */
Down = DownOwner | DownPopup,
/** When the mouse enters the owner element. */
EnterOwner = 64,
/** When the mouse enters the popup. */
EnterPopup = 128,
/** When the mouse enters the owner element or the popup. */
Enter = EnterOwner | EnterPopup,
/** When the mouse leaves the owner element. */
LeaveOwner = 256,
/** When the mouse leaves the popup. */
LeavePopup = 512,
/** When the mouse leaves the owner element or the popup. */
Leave = LeaveOwner | LeavePopup
}
확장된 enum은 더 많은 선택과 특수성을 제공합니다. 이를 통해 개발자는 코드를 작성하지 않고도 팝업을 보다 효과적으로 제어할 수 있습니다.
추가 설정이 필요하지 않은 경우 원래 값이 여전히 유효하고 이전과 동일한 동작을 하기 때문에 코드를 전혀 변경할 필요가 없습니다.
댓글목록
등록된 댓글이 없습니다.