Package zebkit.web |
Web specific stuff to provide abstracted method to work in WEB context.
Classes:
protected
|
<CanvasRenderingContext2D> | $canvas (c, w, h, [forceResize]) |
private
|
<Boolean> | $contains (element) |
protected
|
<HTMLElement> | $createBlockedElement ( ) |
private
|
void | $extendContext (ctx, methods) |
private
|
<Boolean> | $isInsideElement (element, pageX, pageY) |
private
|
<Object> | $viewPortSize ( ) |
protected
<CanvasRenderingContext2D>
$canvas (c, w, h, [forceResize] )
Adjusts the given HTML Canvas element to the required size that takes in account device DPI. Extend the canvas 2D context with extra methods and variables that are used with zebkit UI engine. Parameters:
Returns:
<CanvasRenderingContext2D>
a 2D context of the canvas element |
protected
<HTMLElement>
$createBlockedElement ( )
Creates HTML element that "eats" (doesn't propagate and prevents default) all input (touch, mouse, key) events that it gets.
Returns:
<HTMLElement>
a created HTML element. |
private
void
$extendContext (ctx, methods )
Extend standard 2D HTML Canvas context instance with the given set of methods. If new methods clash with already existent 2D context method the old one is overwritten with new one and old method is saved using its name prefixed with "$" character Parameters:
|
private
<Boolean>
$isInsideElement (element, pageX, pageY )
Test if the given page coordinates is inside the given element Parameters:
Returns:
<Boolean>
true if the given point is inside the specified DOM element |