Class Index | File Index

Classes


Class M.CanvasView


Extends M.View.
This is the prototype of any canvas view. It basically renders a simple canvas tag into the DOM. Additionally it offers some wrappers for canvas-based methods, but mostly you will just use this view for the first rendering of the canvas element and then work on the dom element itself.
Defined in: canvas.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
This property specifies the recommended events for this type of view.
 
The type of this object.
Fields borrowed from class M.View:
childViews, computedValue, contentBinding, contentBindingReverse, cssClass, cssClassOnError, cssClassOnInit, cssStyle, events, hasFocus, html, id, isInline, isView, modelId, parentView, triggerActionOnChange, triggerActionOnEnter, triggerActionOnKeyUp, value
Method Summary
Method Attributes Method Name and Description
 
This method returns the canvas' DOM representation.
 
getContext(type)
This method returns the canvas' context.
 
This method returns the canvas' height.
 
This method returns the canvas' width.
 
setHeight(height)
This method sets the canvas' height.
 
setSize(width, height)
This method sets the canvas' size.
 
setWidth(width)
This method sets the canvas' width.
Methods borrowed from class M.View:
addCssClass, attachToObservable, clearHtml, clearValue, clearValues, computeValue, contentDidChange, delegateValueUpdate, design, getChildViewsAsArray, getIds, getValue, getValues, gotFocus, lostFocus, nl2br, registerEvents, removeCssClass, removeCssProperty, renderUpdate, secure, setCssProperty, setValueFromDOM, style, tab2space, theme, themeChildViews
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.CanvasView()
Field Detail
{Array} recommendedEvents
This property specifies the recommended events for this type of view.

{String} type
The type of this object.
Method Detail
{Object} getCanvas()
This method returns the canvas' DOM representation.
Returns:
{Object} The canvas' DOM representation.

{Object} getContext(type)
This method returns the canvas' context.
Parameters:
{String} type
The context tyoe to return.
Returns:
{Object} The canvas' context.

{Number} getHeight()
This method returns the canvas' height.
Returns:
{Number} The canvas' height.

{Number} getWidth()
This method returns the canvas' width.
Returns:
{Number} The canvas' width.

setHeight(height)
This method sets the canvas' height.
Parameters:
{Number} height
The height to be applied to the canvas view.

setSize(width, height)
This method sets the canvas' size.
Parameters:
{Number} width
The width to be applied to the canvas view.
{Number} height
The height to be applied to the canvas view.

setWidth(width)
This method sets the canvas' width.
Parameters:
{Number} width
The width to be applied to the canvas view.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 25 2012 20:41:09 GMT+0100 (MEZ)