Functiondijit.placeOnScreen

dojo.require("dijit");
defined in dijit/_base/place.js

Keeps 'node' in the visible area of the screen while trying to place closest to pos.x, pos.y. The input coordinates are expected to be the desired document position. Set which corner(s) you want to bind to, such as placeOnScreen(node, {x: 10, y: 20}, ["TR", "BL"]) The desired x/y will be treated as the topleft(TL)/topright(TR) or BottomLeft(BL)/BottomRight(BR) corner of the node. Each corner is tested and if a perfect match is found, it will be used. Otherwise, it goes through all of the specified corners, and choose the most appropriate one. NOTE: node is assumed to be absolutely or relatively positioned.

Usage

function (/*DomNode*/ node, /*Object*/ pos, /*Object*/ corners, /*Boolean?*/ tryOnly) (view source)
parametertypedescription
nodeDomNode 
posObject 
cornersObject 
tryOnlyBooleanOptional.