PHP Class SVGGraphJavascript, GotCms

Show file Open project: gotcms/gotcms

Protected Properties

Property Type Description
$comments
$functions
$onload
$variables

Public Methods

Method Description
AddEventHandler ( &$array, $evt, $code ) Adds an inline event handler to an element's array
AddFunction ( $name ) Adds a javascript function
AddOverlay ( $from, $to ) Add an overlaid copy of an element, with opacity of 0
AutoHide ( &$element ) Makes something auto-hide
GetFunctions ( ) Returns the functions as Javascript code
GetOnload ( ) Returns the onload code to use for the SVG
GetVariables ( ) Returns the variables (and comments) as Javascript code
InsertComment ( $details ) Insert a comment into the Javascript section - handy for debugging!
InsertFunction ( $name, $fn ) Inserts a Javascript function into the list
InsertVariable ( $var, $value, $more = NULL, $quote = TRUE ) Adds a Javascript variable - use $value:$more for assoc - use NULL:$more for array
SetDraggable ( &$element ) Makes an item draggable
SetFader ( &$element, $in, $out, $target = NULL, $duplicate = FALSE ) Sets the fader for an element
SetTooltip ( &$element, $text, $duplicate = FALSE ) Sets the tooltip for an element
__construct ( &$settings, &$graph ) Constructor takes array of settings and graph instance as arguments
__get ( $name ) Return the settings as properties

Method Details

AddEventHandler() public method

Adds an inline event handler to an element's array
public AddEventHandler ( &$array, $evt, $code )

AddFunction() public method

Adds a javascript function
public AddFunction ( $name )

AddOverlay() public method

Add an overlaid copy of an element, with opacity of 0
public AddOverlay ( $from, $to )

AutoHide() public method

Makes something auto-hide
public AutoHide ( &$element )

GetFunctions() public method

Returns the functions as Javascript code
public GetFunctions ( )

GetOnload() public method

Returns the onload code to use for the SVG
public GetOnload ( )

GetVariables() public method

Returns the variables (and comments) as Javascript code
public GetVariables ( )

InsertComment() public method

Insert a comment into the Javascript section - handy for debugging!
public InsertComment ( $details )

InsertFunction() public method

Inserts a Javascript function into the list
public InsertFunction ( $name, $fn )

InsertVariable() public method

Adds a Javascript variable - use $value:$more for assoc - use NULL:$more for array
public InsertVariable ( $var, $value, $more = NULL, $quote = TRUE )

SetDraggable() public method

Makes an item draggable
public SetDraggable ( &$element )

SetFader() public method

Sets the fader for an element
public SetFader ( &$element, $in, $out, $target = NULL, $duplicate = FALSE )

SetTooltip() public method

Sets the tooltip for an element
public SetTooltip ( &$element, $text, $duplicate = FALSE )

__construct() public method

Constructor takes array of settings and graph instance as arguments
public __construct ( &$settings, &$graph )

__get() public method

Return the settings as properties
public __get ( $name )

Property Details

$comments protected property

protected $comments

$functions protected property

protected $functions

$onload protected property

protected $onload

$variables protected property

protected $variables