getCursorPosition
static
JSON
getCursorPosition
(
event
)
Returns a JSON with cursor coordinates.
- Parameters:
-
event <event>
- Returns:
JSON
- a JSON with properties
x
andy
getDocumentDimension
static
JSON
getDocumentDimension
(
)
Returns a JSON containing information on whole document dimension.
- Returns:
JSON
width: Integer, // the document width w: Integer, // same as width, just shorter height: Integer, // the document height h: Integer // same as height, just shorter
getObjectPosition
static
JSON
getObjectPosition
(
node
)
Returns a JSON with {@param}
node
's coordinates from its top-left corner.
- Parameters:
-
node <DOM>
the DOM Object
- Returns:
JSON
- a JSON with properties
x
andy
getPageDimension
static
JSON
getPageDimension
(
)
Returns a JSON containing information on page dimension. It's at least as big as document.
- Returns:
JSON
width: Integer, // the document width w: Integer, // same as width, just shorter height: Integer, // the document height h: Integer // same as height, just shorter
getViewportDimension
static
JSON
getViewportDimension
(
)
Alias for jsbeans.sizeandposition.getPageDimension
- Returns:
JSON
setObjectPosition
static
void
setObjectPosition
(
node
,
top
,
left
)
Moves {@param}
node
using style absolute position starting from {@param} top
/{@param} left
.
- Parameters:
-
node <DOM>
the DOM Object to move -
top <Integer>
distance from top border (in pixels) -
left <Integer>
distance from left border (in pixels)
- Returns:
void