Project Docs Github
Log in
ittf site docs play t js app splash.js.ittf Edit
  • /ittf/site/docs/play/t/js/app/splash.js.ittf

/ittf/site/docs/play/t/js/app/splash.js.ittf (primary)

edit
                                            
1 $group
2 class SplashControl
3 ctor
4 param props
5 set this.props = props
6 set this.splashEl = null
7 set this.state = []
8 set this.visible == false
9 m initialize
10 var containerEl
11 _ wz.element
12 @ this.props.container
13 set this.splashEl = document.createElement('div')
14 _ this.splashEl.setAttribute('class', this.props.className)
15 _ containerEl.appendChild(this.splashEl)
16 _ this.show
17 m hide
18 if this.visible == false
19 return
20 set this.visible = false
21 var containerEl
22 _ wz.element
23 @ this.props.container
24 foreach item in containerEl.children
25 if item != this.splashEl
26 _ wz.show
27 @ item
28 if this.state[item]
29 set item.style.display = this.state[item]
30 _ wz.hide
31 @ this.splashEl
32 m show
33 if this.visible
34 return
35 set this.visible = true
36 var containerEl
37 _ wz.element
38 @ this.props.container
39 _ wz.show
40 @ this.splashEl
41 foreach item in containerEl.children
42 if item != this.splashEl
43 set this.state[item] = item.style.display
44 _ wz.hide
45 @ item
Save
Save & Refresh
Cancel