Skip to content

Latest commit

 

History

History
75 lines (65 loc) · 1.61 KB

UIDiv.md

File metadata and controls

75 lines (65 loc) · 1.61 KB

UIDiv

Kind: global class
Npmpackage:

new UIDiv()

This is a display object class, which is a DOM element

, that internally handles assigning the passed in parameters.
Import from ad-ui

import { UIDiv } from 'ad-ui'



Sample 1:

// bare minimum creation - can be added to anything and named later.
var myBase = new UIDiv()



Sample 1:

// simple creation - no style
// Added to a container, such as Main
T.myBase = new UIDiv({
	target : T,
	id : 'my-div'
})



Sample 2:

// create with assigned styles
var myBase = new UIDiv({
	target : T,
	id : 'my-div',
	css : {
		x : 36,
		y : 14,
		width : 120,
		height: 140
	}
});

UIDiv.parent : element

Getter : Returns the parent, ie the DOM element this

is inside of.

Kind: static property of UIDiv
Example

// get
console.log(myImage.source)

// set
myImage.source = 'template_image'

UIDiv.toString()

A String to represet the object type.

Kind: static method of UIDiv
Example

myDiv.toString()