Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dijit/_base/place.js

  • Provides:

    • dijit._base.place
  • Requires:

    • dojo.window in common
    • dojo.AdapterRegistry in common
  • dijit.getViewport

    • summary
      Returns the dimensions and scroll position of the viewable area of a browser window
    • type
      Function
  • dijit.__Position

    • type
      Function
  • dijit.__Position.y

    • type
      Integer
    • summary
      vertical coordinate in pixels, relative to document body
  • thix.x

    • alias - x
  • dijit.placeOnScreen

    • parameters:
      • node: (typeof DomNode)
      • pos: (typeof dijit.__Position)
        Object like {x: 10, y: 20}
      • corners: (typeof String[])
        Array of Strings representing order to try corners in, like ["TR", "BL"].
        Possible values are:
        * "BL" - bottom left
        * "BR" - bottom right
        * "TL" - top left
        * "TR" - top right
      • padding: (typeof dijit.__Position)
        set padding to put some buffer around the element you want to position.
    • summary
      Positions one of the node's corners at specified position
      such that node is fully visible in viewport.
    • description
      NOTE: node is assumed to be absolutely or relatively positioned.
    • example
      Try to place node's top right corner at (10,20).
      If that makes node go (partially) off screen, then try placing
      bottom left corner at (10,20).
      	placeOnScreen(node, {x: 10, y: 20}, ["TR", "BL"])
    • type
      Function
  • dijit._place

    • parameters:
      • node: (typeof DomNode)
      • choices: (typeof Array)
        Array of elements like: {corner: 'TL', pos: {x: 10, y: 20} }
        Above example says to put the top-left corner of the node at (10,20)
      • layoutNode: (typeof Function(node,)
        aroundNodeCorner, nodeCorner, size)
        for things like tooltip, they are displayed differently (and have different dimensions)
        based on their orientation relative to the parent.   This adjusts the popup based on orientation.
        It also passes in the available size for the popup, which is useful for tooltips to
        tell them that their width is limited to a certain amount.   layoutNode() may return a value expressing
        how much the popup had to be modified to fit into the available space.   This is used to determine
        what the best placement is.
      • aroundNodeCoords: (typeof Object)
        Size of aroundNode, ex: {w: 200, h: 50}
    • summary
      Given a list of spots to put node, put it at the first spot where it fits,
      of if it doesn't fit anywhere then the place with the least overflow
    • type
      Function
  • dijit.placeOnScreenAroundNode

    • parameters:
      • node: (typeof DomNode)
      • aroundNode: (typeof DomNode)
      • aroundCorners: (typeof Object)
        Ordered list of pairs of corners to try matching up.
        Each pair of corners is represented as a key/value in the hash,
        where the key corresponds to the aroundNode's corner, and
        the value corresponds to the node's corner:
        
        	{ aroundNodeCorner1: nodeCorner1, aroundNodeCorner2: nodeCorner2, ...}
        
        The following strings are used to represent the four corners:
        * "BL" - bottom left
        * "BR" - bottom right
        * "TL" - top left
        * "TR" - top right
      • layoutNode: (typeof Function)
        Function(node, aroundNodeCorner, nodeCorner)
        For things like tooltip, they are displayed differently (and have different dimensions)
        based on their orientation relative to the parent.   This adjusts the popup based on orientation.
    • summary
      Position node adjacent or kitty-corner to aroundNode
      such that it's fully visible in viewport.
    • description
      Place node such that corner of node touches a corner of
      aroundNode, and that node is fully visible.
    • example
      	dijit.placeOnScreenAroundNode(node, aroundNode, {'BL':'TL', 'TR':'BR'});
      This will try to position node such that node's top-left corner is at the same position
      as the bottom left corner of the aroundNode (ie, put node below
      aroundNode, with left edges aligned).  If that fails it will try to put
      the bottom-right corner of node where the top right corner of aroundNode is
      (ie, put node above aroundNode, with right edges aligned)
    • type
      Function
  • dijit.__Rectangle

    • type
      Function
  • dijit.__Rectangle.x

    • type
      Integer
    • summary
      horizontal offset in pixels, relative to document body
  • dijit.__Rectangle.y

    • type
      Integer
    • summary
      vertical offset in pixels, relative to document body
  • dijit.__Rectangle.width

    • type
      Integer
    • summary
      width in pixels
  • dijit.__Rectangle.height

    • type
      Integer
    • summary
      height in pixels
  • dijit.placeOnScreenAroundRectangle

    • parameters:
      • node: (typeof DomNode)
      • aroundRect: (typeof dijit.__Rectangle)
      • aroundCorners: (typeof Object)
      • layoutNode: (typeof Function)
    • summary
      Like dijit.placeOnScreenAroundNode(), except that the "around"
      parameter is an arbitrary rectangle on the screen (x, y, width, height)
      instead of a dom node.
    • type
      Function
  • dijit._placeOnScreenAroundRect

    • parameters:
      • node: (typeof DomNode)
      • x: (typeof Number)
      • y: (typeof Number)
      • width: (typeof Number)
      • height: (typeof Number)
      • aroundCorners: (typeof Object)
      • layoutNode: (typeof Function)
    • summary
      Like dijit.placeOnScreenAroundNode(), except it accepts coordinates
      of a rectangle to place node adjacent to.
    • type
      Function
  • dijit.placementRegistry

    • type
      Object
  • dijit.placeOnScreenAroundElement

    • parameters:
      • node: (typeof DomNode)
      • aroundElement: (typeof Object)
      • aroundCorners: (typeof Object)
      • layoutNode: (typeof Function)
    • summary
      Like dijit.placeOnScreenAroundNode(), except it accepts an arbitrary object
      for the "around" argument and finds a proper processor to place a node.
    • type
      Function
  • dijit.getPopupAroundAlignment

    • parameters:
      • position: (typeof Array)
        String[] This variable controls the position of the drop down.
        It's an array of strings with the following values:
        
        * before: places drop down to the left of the target node/widget, or to the right in
        the case of RTL scripts like Hebrew and Arabic
        * after: places drop down to the right of the target node/widget, or to the left in
        the case of RTL scripts like Hebrew and Arabic
        * above: drop down goes above target node
        * below: drop down goes below target node
        
        The list is positions is tried, in order, until a position is found where the drop down fits
        within the viewport.
      • leftToRight: (typeof Boolean)
        Whether the popup will be displaying in leftToRight mode.
    • summary
      Transforms the passed array of preferred positions into a format suitable for passing as the aroundCorners argument to dijit.placeOnScreenAroundElement.
    • type
      Function
  • dijit._base.place

    • type
      Object
  • dijit._base

    • type
      Object
  • dijit

    • type
      Object