CGSGCSSManager Class
A CGSGCSSManager represent a basic circle
Constructor
CGSGCSSManager
()
Item Index
Methods
Properties
Methods
_createDelegate
-
objectContext
-
delegateMethod
used to call delegate method when the css file is finally loaded
Returns:
_onFileAbort
-
event
To be overrided when the css file loading is aborted
Parameters:
-
event
Event
_onFileError
-
event
To be overrided when the css file failed to load
Parameters:
-
event
Event
_onFileLoaded
-
event
fired when the css file is loaded.
Parameters:
-
event
Event
getAttr
-
cls
-
attr
Return the value for the attribute of the class passed as parameters
Returns:
getAttrInArray
-
clss
-
attr
Return the value for the latest attribute of the classes passed as parameters
Returns:
value for the CSS attribute
getCls
-
cls
Parameters:
-
cls
StringName of the CSS class
Returns:
Array of attributes
getFloat
-
attr
Extract the number from an attribute's value. For example getFloat("0.6px"); will return 0.6.
Parameters:
-
attr
String
Returns:
getNumber
-
attr
Extract the number from an attribute's value. For example getNumber("8px"); will return 8.
Parameters:
-
attr
String
Returns:
getNumber
-
attr
Extract the number from an attribute's value. For example getNumber("8px"); will return 8.
Parameters:
-
attr
String
Returns:
ignoreCSSFile
-
href
Blacklist this file. Cache need to be invalidated after by calling {invalidateCache} method
Parameters:
-
href
StringMust be full href path and filename
invalidateCache
()
Read content of all CSS files loaded and update its cache
unloadCSSFile
-
filename
Unload CSS file from current HTML page. Cache need to be invalidated after by calling {invalidateCache} method
Parameters:
-
filename
String
Properties
_classes
Array
private
All css classes loaded for the current HTML document. [selectorText {String}, style {CSSStyleDeclaration}]
onLoadAbort
Function node:this
Event Fired when the css file loading is aborted
Default: null
onLoadEnd
Function node:this
Event Fired when the css file is finally loaded
Default: null
onLoadError
Function node:this
Event Fired when the css file failed to load
Default: null