Show:

Q fisheye Class

Adds a fisheye effect to an element and its children

Constructor

Q fisheye

(
  • [options]
)

Parameters:

  • [options] Object optional

    possible options

    • [horizontal=false] Boolean optional

      whether to do fisheye effect in horizontal direction

    • [vertical=false] Boolean optional

      whether to do fisheye effect in vertical direction

    • [useCenters=false] Boolean optional

      whether to calculate distance to the center instead of to the element

    • [fillContainer=false] Boolean optional

      whether to stretch elements to fill the whole container if they take up less width / height

    • [distribution] Function optional

      you can provide a continuous function that maps distance => scale

Item Index

Methods

Methods

overlay

(
  • [options]
)

This plugin Makes an overlay to show some content above the page. Suitable for showing dialogs, for example. It does not automatically activate its contents, like Q/dialog does.

Parameters:

  • [options] Object optional
    • [apply] Boolean optional

      Set to true if the dialog should show the "apply" style button to close dialog

    • [htmlClass] String optional

      Any class to add to the html element while the overlay is open

    • [mask=false] Boolean | String optional

      If true, adds a mask to cover the screen behind the overlay. If a string, this is passed as the className of the mask.

    • [noClose=false] Boolean optional

      If true, overlay close button will not appear and overlay won't be closed by pressing 'Esc' key.

    • [closeOnEsc=true] Boolean optional

      closeOnEsc Indicates whether to close overlay on 'Esc' key press. Has sense only if 'noClose' is false.

    • [closeOnMask=false] Boolean optional

      If true, closes the dialog if the user clicks anywhere on the mask behind the dialog

    • [fadeInOut=true] Boolean optional

      Indicates whether to use fadeIn() / fadeOut() animations when loading dialog. Note: if set to false, 'onLoad' callback will be called synchronously with dialog load, otherwise it will be called on fadeIn() animation completion.

    • [noCalculatePosition=false] Boolean optional

      Set to true to prevent calculating position automatically

    • [left='center'] String optional

      left is a Horizontal position of the overlay, May have 'center' value to be centered horizontally or have a percentage or absolute (pixels) value of offset from the left border of 'alignParent'.

    • [top='middle'] String optional

      top is a Vertical position of the overlay. May have 'middle' value to be centered vertically or have a percentage or absolute (pixels) value of offset from the top border of 'alignParent'. Optional

    • [alignParent] DOMElement optional

      Can be DOM element, jQuery object or jQuery selector. If provided overlay will be positioned relatively to that element. If null, overlay will be positioned considering window dimensions. Optional.

    • [adjustPositionMs=500] DOMElement optional

      How many milliseconds between adjusting position interval

    • [loadUrl={}] Object optional

      options to override for the call to Q.loadUrl

    • [beforeLoad] Q.Event optional

      beforeLoad Q.Event or function which is called before overlay is loaded (shown).

    • [onLoad] Q.Event optional

      onLoad occurs when overlay has been loaded (shown).

    • [beforeClose] Q.Event optional

      beforeClose occurs when .close() was called on the dialog and it's still visible. Can return false to cancel closing.

    • [onClose] Q.Event optional

      onClose Q.Event or function which is called when overlay is closed and hidden. Optional.

Q/dialog

(
  • [options]
)

Opens a dialog

Parameters:

  • [options] Object optional

    A hash of options, that can include:

    • [url] String optional

      If provided, this url will be used to fetch the "title" and "dialog" slots, to display in the dialog.

    • [htmlClass] String optional

      Any class to add to the html element while the overlay is open

    • [mask=true] Boolean | String optional

      If true, adds a mask to cover the screen behind the dialog. If a string, this is passed as the className of the mask.

    • [fullscreen] Boolean optional

      If true, dialog will be shown not as overlay but instead will be prepended to document.body and all other child elements of the body will be hidden. Thus dialog will occupy all window space, but still will behave like regular dialog, i.e. it can be closed by clicking / tapping close icon. Defaults to true on Android stock browser, false everywhere else.

    • [left='center'] String optional

      left is a Horizontal position of the overlay, May have 'center' value to be centered horizontally or have a percentage or absolute (pixels) value of offset from the left border of 'alignParent'.

    • [top='middle'] String optional

      top is a Vertical position of the overlay. May have 'middle' value to be centered vertically or have a percentage or absolute (pixels) value of offset from the top border of 'alignParent'. Optional

    • [alignByParent=false] Boolean optional

      If true, the dialog will be aligned to the center of not the entire window, but to the center of containing element instead.

    • [fadeInOut=!Q.info.isTouchscreen] Boolean optional

      For desktop and false for touch devices. If true, dialog will load asynchronously with fade animation and 'onLoad' will be called when fade animation is completed. If false, dialog will appear immediately and 'onLoad' will be called at the same time.

    • [waitForBackgroundImage=!Q.info.isTouchscreen] Boolean optional

      Whether to wait for the background image to load before showing the dialog

    • [noClose=false] Boolean optional

      If true, overlay close button will not appear and overlay won't be closed by pressing 'Esc' key.

    • [closeOnEsc=true] Boolean optional

      Indicates whether to close dialog on 'Esc' key press. Has sense only if 'noClose' is false.

    • [closeOnMask=false] Boolean optional

      If true, closes the dialog if the user clicks anywhere on the mask behind the dialog

    • [removeOnClose=false] Boolean optional

      If true, dialog DOM element will be removed from the document on close.

    • [noCalculatePosition=false] Boolean optional

      Set to true to prevent calculating position automatically

    • [loadUrl={}] Object optional

      options to override for the call to Q.loadUrl

    • [beforeLoad] Q.Event optional

      beforeLoad Q.Event or function which is called before overlay is loaded (shown).

    • [onLoad] Q.Event optional

      onLoad occurs when overlay has been loaded (shown).

    • [beforeClose] Q.Event optional

      beforeClose occurs when .close() was called on the dialog and it's still visible. Can return false to cancel closing.

    • [onActivate] Q.Event optional

      Q.Event or function which is called when dialog is activated (all inner tools, if any, are activated and dialog is fully loaded and shown).

    • [onClose] Q.Event optional

      Q.Event or function which is called when dialog is closed and hidden and probably removed from DOM (if 'removeOnClose' is 'true'). * @param {Boolean} [options.apply] Set to true if the dialog should show the "apply" style button to close dialog