Q fisheye Class
Adds a fisheye effect to an element and its children
Constructor
Q fisheye
-
[options]
Parameters:
-
[options]
Object optionalpossible options
-
[horizontal=false]
Boolean optionalwhether to do fisheye effect in horizontal direction
-
[vertical=false]
Boolean optionalwhether to do fisheye effect in vertical direction
-
[useCenters=false]
Boolean optionalwhether to calculate distance to the center instead of to the element
-
[fillContainer=false]
Boolean optionalwhether to stretch elements to fill the whole container if they take up less width / height
-
[distribution]
Function optionalyou can provide a continuous function that maps distance => scale
-
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 optionalSet to true if the dialog should show the "apply" style button to close dialog
-
[htmlClass]
String optionalAny class to add to the html element while the overlay is open
-
[mask=false]
Boolean | String optionalIf 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 optionalIf true, overlay close button will not appear and overlay won't be closed by pressing 'Esc' key.
-
[closeOnEsc=true]
Boolean optionalcloseOnEsc Indicates whether to close overlay on 'Esc' key press. Has sense only if 'noClose' is false.
-
[closeOnMask=false]
Boolean optionalIf true, closes the dialog if the user clicks anywhere on the mask behind the dialog
-
[fadeInOut=true]
Boolean optionalIndicates 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 optionalSet to true to prevent calculating position automatically
-
[left='center']
String optionalleft 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 optionaltop 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 optionalCan 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 optionalHow many milliseconds between adjusting position interval
-
[loadUrl={}]
Object optionaloptions to override for the call to Q.loadUrl
-
[beforeLoad]
Q.Event optionalbeforeLoad Q.Event or function which is called before overlay is loaded (shown).
-
[onLoad]
Q.Event optionalonLoad occurs when overlay has been loaded (shown).
-
[beforeClose]
Q.Event optionalbeforeClose occurs when .close() was called on the dialog and it's still visible. Can return false to cancel closing.
-
[onClose]
Q.Event optionalonClose Q.Event or function which is called when overlay is closed and hidden. Optional.
-
Q/dialog
-
[options]
Opens a dialog
Parameters:
-
[options]
Object optionalA hash of options, that can include:
-
[url]
String optionalIf provided, this url will be used to fetch the "title" and "dialog" slots, to display in the dialog.
-
[htmlClass]
String optionalAny class to add to the html element while the overlay is open
-
[mask=true]
Boolean | String optionalIf 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 optionalIf 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 optionalleft 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 optionaltop 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 optionalIf 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 optionalFor 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 optionalWhether to wait for the background image to load before showing the dialog
-
[noClose=false]
Boolean optionalIf true, overlay close button will not appear and overlay won't be closed by pressing 'Esc' key.
-
[closeOnEsc=true]
Boolean optionalIndicates whether to close dialog on 'Esc' key press. Has sense only if 'noClose' is false.
-
[closeOnMask=false]
Boolean optionalIf true, closes the dialog if the user clicks anywhere on the mask behind the dialog
-
[removeOnClose=false]
Boolean optionalIf true, dialog DOM element will be removed from the document on close.
-
[noCalculatePosition=false]
Boolean optionalSet to true to prevent calculating position automatically
-
[loadUrl={}]
Object optionaloptions to override for the call to Q.loadUrl
-
[beforeLoad]
Q.Event optionalbeforeLoad Q.Event or function which is called before overlay is loaded (shown).
-
[onLoad]
Q.Event optionalonLoad occurs when overlay has been loaded (shown).
-
[beforeClose]
Q.Event optionalbeforeClose occurs when .close() was called on the dialog and it's still visible. Can return false to cancel closing.
-
[onActivate]
Q.Event optionalQ.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 optionalQ.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
-