Package pyjamas :: Package dnd :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Classes [hide private]
  DraggingWidget
A widget for holding the dragging feedback elements.
  DOMStringList
DOMStringList implementation http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#DOMStringList
  Uri_list
text/uri-list implementation
Functions [hide private]
 
isIn(element, x, y)
Given an element and an absolute x and y, return True if the (x,y) coordinate is within the element.
source code
 
isCanceled(event)
Has the DragEvent been canceled? Coding this package was much easier with this function.
source code
 
findDraggable(element, x, y)
Find the element within a widget's main element that is draggable and under the mouse cursor.
source code
 
cloneElement(element) source code
 
getComputedStyle(element, style=None)
Get computed style of an element, like in http://efreedom.com/Question/1-1848445/Duplicating-Element-Style-JavaScript
source code
 
copyStyles(elem1, elem2)
Copy styles from one element to another, like in http://efreedom.com/Question/1-1848445/Duplicating-Element-Style-JavaScript
source code
 
getTargetInChildren(element, x, y)
x and y are absolute coordinates within the document.
source code
 
getElementUnderMouse(widget, x, y)
Return the most specific element in widget that contains (x,y).
source code
 
eventCoordinates(event)
Get the absolute coordinates of a mouse event.
source code
 
getScrollOffsets() source code
Function Details [hide private]

isIn(element, x, y)

source code 

Given an element and an absolute x and y, return True if the (x,y) coordinate is within the element. Otherwise, return False.

findDraggable(element, x, y)

source code 

Find the element within a widget's main element that is draggable and under the mouse cursor. We need this for event delegation.

getTargetInChildren(element, x, y)

source code 

x and y are absolute coordinates within the document. Return the last child of element that contains (x,y). Return None if not found.

eventCoordinates(event)

source code 

Get the absolute coordinates of a mouse event. http://www.quirksmode.org/js/events_properties.html#position