summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/mx/primitives/mx.tableau.js
blob: 514e2060eb5a73703849d52bac246b200f886f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
var Tableau = function(){
	this.extend = extend.bind(Tableau)

	function extend (props) {
		var Super = this
		var ExtendedTableau = function () {
			Super.call(this)
			props.init && props.init.apply(this, arguments)
		}
		ExtendedTableau.prototype = Object.create(Tableau.prototype)
		for (var prop in props) {
			if (props.hasOwnProperty(prop) && prop !== 'init') {
				ExtendedTableau.prototype[prop] = props[prop]
			}
		}
		ExtendedTableau.extend = extend.bind(ExtendedTableau)
		return ExtendedTableau
	}
}

Tableau.prototype.init = function(opt){}
Tableau.prototype.animate = function(t){}
Tableau.prototype.show = function(){}
Tableau.prototype.hide = function(){}

MX.Tableau = new Tableau()
MX.Tableaux = {}

/*

MX.Tableaux.Foo = MX.Tableau.extend({
	// this will be called within the contructor
	init: function (opt) {
	},
	
	show: function(){
	},
	
	hide: function(){
	},
	
	animate: function() {
	}
})

*/