type

Popup

src @Js
class Popup : Elem

Popup window which can be closed clicking outside of element.

See also: docDomkit

constructors

fields

halign

Where to align Popup relative to open(x,y)

isOpen

Return true if this popup currently open.

methods

close

Close this popup.

fitBounds

Fit popup with current window bounds.

onBeforeOpen

Protected sub-class callback invoked directly before popup is visible.

onClose

Callback when popup is closed.

onOpen

Callback when popup is opened.

open

Open this popup in the current Window.

Slot Details

close

src Void close()

Close this popup. If popup is already closed this method does nothing.

fitBounds

src Void fitBounds()

Fit popup with current window bounds. This may move the origin of where popup is opened, or modify the width or height, or both.

This method is called automatically by open. For content that is asynchronusly loaded after popup is visible, and that may modify the initial size, it is good practice to invoke this method to verify content does not overflow the viewport.

If popup is not open, this method does nothing.

halign

src Align halign := Align.left

Where to align Popup relative to open(x,y):

  • Align.left: align left edge popup to (x,y)
  • Align.center: center popup with (x,y)
  • Align.right: align right edge of popup to (x,y)

isOpen

src Bool isOpen { private set }

Return true if this popup currently open.

make

src new make()

onBeforeOpen

src protected virtual Void onBeforeOpen()

Protected sub-class callback invoked directly before popup is visible.

onClose

src Void onClose(|This| f)

Callback when popup is closed.

onOpen

src Void onOpen(|This| f)

Callback when popup is opened.

open

src Void open(Float x, Float y)

Open this popup in the current Window. If popup is already open this method does nothing. This method always invokes fitBounds to verify popup does not overflow viewport.