Hilo


Module hilo/core/Hilo Requires hilo/util/browser, hilo/util/util Source Hilo.js
Hilo The underlying core set of methods.

Properties

Property Defined
static Browser feature set includes:
Hilo
static Visual object alinment enumeration objects include:
  • TOP_LEFT - Align the top left corner.
Hilo
version:String
static Hilo version
Hilo
static Event enumeration objects include:
  • POINTER_START - Mouse or touch start event.
Hilo

Methods

Method Defined
getElementRect(elem:HTMLElement):Object
static Get DOM element content in the page display area.
Hilo
createElement(type:String, properties:Object):HTMLElement
static Create a DOM element.
Hilo
viewToString(view:View):String
static Generates a string representation that contains a path to the specified visual object.
Hilo
getUid(prefix:String):String
static Gets a globally unique id.
Hilo
getElement(id:String):HTMLElement
static Gets a DOM element according to the parameter id.
Hilo
copy(target:Object, source:Object, strict:Boolean):Object
static Simple shallow copy objects.
Hilo
getTransformCSS(obj:View):String
static Generated visual object CSS style transformation.
Hilo

Property Detail

[Static] align
Visual object alinment enumeration objects include:
  • TOP_LEFT - Align the top left corner.
  • TOP - Top center alignment.
  • TOP_RIGHT - Align the top right corner.
  • LEFT - Left center alignment.
  • CENTER - Align center.
  • RIGHT - Right center alignment.
  • BOTTOM_LEFT - Align the bottom left corner.
  • BOTTOM - Bottom center alignment.
  • BOTTOM_RIGHT - Align the bottom right corner.
[Static] browser
Browser feature set includes:
see:
browser
[Static] event
Event enumeration objects include:
  • POINTER_START - Mouse or touch start event. Corresponds to touchstart or mousedown.
  • POINTER_MOVE - Mouse or touch move event. Corresponds to touchmove or mousemove.
  • POINTER_END - Mouse or touch end event. Corresponds to touchend or mouseup.
[Static] version:String
Hilo version

Method Detail

[Static] copy(target:Object, source:Object, strict:Boolean):Object
Simple shallow copy objects.
parameters
target:Object — Target object to copy to.
source:Object — Source object to copy.
strict:Boolean — Indicates whether replication is undefined property, default is false, i.e., undefined attributes are not copied.
Deprecated
use Hilo.util.copy instead
return
Object — Object after copying.
[Static] createElement(type:String, properties:Object):HTMLElement
Create a DOM element. You can specify properties and styles.
parameters
type:String — DOM element type to be created. Such as: 'div'.
properties:Object — Properties and styles for DOM element.
return
HTMLElement — A DOM element.
[Static] getElement(id:String):HTMLElement
Gets a DOM element according to the parameter id. This method is equivalent to document.getElementById(id).
parameters
id:String — id of the DOM element you want to get.
return
HTMLElement — A DOM element.
[Static] getElementRect(elem:HTMLElement):Object
Get DOM element content in the page display area.
parameters
elem:HTMLElement — DOM elements.
return
Object — Viewable area DOM elements. Format is: {left:0, top:0, width:100, height:100}.
[Static] getTransformCSS(obj:View):String
Generated visual object CSS style transformation.
parameters
obj:View — Specifies visual object whose CSS style must be got.
return
String — String representation of the CSS style.
[Static] getUid(prefix:String):String
Gets a globally unique id. Such as Stage1, Bitmap2 etc.
parameters
prefix:String — Generated id's prefix.
return
String — Globally unique id.
[Static] viewToString(view:View):String
Generates a string representation that contains a path to the specified visual object. Such as Stage1.Container2.Bitmap3.
parameters
view:View — Specified visual object.
return
String — String representation of the visual object.