Class: Mixins

markus.elements.Mixins

Class store all mixin properties of elements

new markus.elements.Mixins ()

Example
mixins
 .label
   @size 120

 sprite.quad
   @width 100
   @height 100

Mixes In

Members

this.childList Array.<Element>

Childs list

this.element string readonly

Element name

this.id string readonly

Element id

this.mark markus.View

Root view class

mixins Array.<Object>

Mixins array.

this.parentElement Element

Parent node

this.presets markus.View

Presets list

this.props Array.<function()> readonly

Element properties from markus markup

this.tags Array.<string>

Element tags

this.ticks Array.<function()>

Аrray of functions called every tick

Methods

addTag (props)

Add tag to tags list and app mixin props

Name Type Description
props string

tagName

addTick (cb)

Add function to ticks array

Name Type Description
cb funciton

Every tick is called

merge ()Object

Merging mixin with elements props

Properties:
Name Type Argument Description
elm Element

Element for merge

props= <optional>

{Object} Element props

Returns:
Type Description
Object merged elm props with mixin props

removeTag (props)

Remove tag from tags list and reuse mixins props

Name Type Description
props string

tagName

set ()

Set mixin to store

Properties:
Name Type Description
selector string

Mixin selector

props Object

Mixin props

setProps (props)

Set props to element

Name Type Description
props Object

Props object