File tree Expand file tree Collapse file tree 5 files changed +88
-1
lines changed Expand file tree Collapse file tree 5 files changed +88
-1
lines changed Original file line number Diff line number Diff line change
1
+ .spinner {
2
+ position : absolute;
3
+ left : 50% ;
4
+ top : 50% ;
5
+ display : inline-block;
6
+ width : 0 ;
7
+ height : 0 ;
8
+ z-index : 1 ;
9
+
10
+ -webkit-animation : spin 1s linear infinite;
11
+ -moz-animation : spin 1s linear infinite;
12
+ -o-animation : spin 1s linear infinite;
13
+ animation : spin 1s linear infinite;
14
+ }
15
+
16
+ .spinner : after {
17
+ content : "" ;
18
+ position : absolute;
19
+ left : -20px ;
20
+ top : -20px ;
21
+ width : 40px ;
22
+ height : 22px ;
23
+ border-radius : 20px 20px 0 0 ;
24
+ background : black;
25
+ z-index : 0 ;
26
+ }
27
+
28
+ .spinner : before {
29
+ content : "" ;
30
+ position : absolute;
31
+ left : -15px ;
32
+ top : -15px ;
33
+ width : 30px ;
34
+ height : 30px ;
35
+ border-radius : 15px ;
36
+ background : white;
37
+ box-shadow : 0 0 5px white;
38
+ z-index : 1 ;
39
+ }
40
+
41
+ @-webkit-keyframes spin {
42
+ 100% {
43
+ -webkit-transform : rotate (360deg );
44
+ }
45
+ }
46
+
47
+ @-moz-keyframes spin {
48
+ 100% {
49
+ -moz-transform : rotate (360deg );
50
+ }
51
+ }
52
+
53
+ @-o-keyframes spin {
54
+ 100% {
55
+ -o-transform : rotate (360deg );
56
+ }
57
+ }
58
+
59
+ @keyframes spin {
60
+ 100% {
61
+ transform : rotate (360deg );
62
+ }
63
+ }
Original file line number Diff line number Diff line change 1
1
# treeView {
2
+ position : relative;
2
3
display : block;
3
4
font-size : 16px ;
4
- margin : 5 px ;
5
+ min-height : 100 % ;
5
6
}
6
7
7
8
.tv-package-name .minimized + .tv-package-content {
Original file line number Diff line number Diff line change 5
5
< title > Caché UML explorer</ title >
6
6
< link rel ="stylesheet " href ="css/interface.css "/>
7
7
< link rel ="stylesheet " href ="css/treeView.css "/>
8
+ < link rel ="stylesheet " href ="css/extras.css "/>
8
9
< script type ="text/javascript " src ="js/Lib.js "> </ script >
9
10
< script type ="text/javascript " src ="js/CacheUMLExplorer.js "> </ script >
10
11
< script type ="text/javascript " src ="js/ClassTree.js "> </ script >
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ CacheUMLExplorer.prototype.init = function () {
18
18
19
19
var self = this ;
20
20
21
+ this . classTree . showLoader ( ) ;
21
22
this . source . getClassTree ( function ( err , data ) {
22
23
if ( ! err ) self . classTree . updateTree ( data ) ;
23
24
} ) ;
Original file line number Diff line number Diff line change 6
6
var ClassTree = function ( treeViewContainer ) {
7
7
8
8
this . container = treeViewContainer ;
9
+ this . loader = null ;
10
+
11
+ } ;
12
+
13
+ ClassTree . prototype . showLoader = function ( ) {
14
+
15
+ if ( this . loader ) return ;
16
+
17
+ this . loader = document . createElement ( "div" ) ;
18
+ this . loader . className = "spinner" ;
19
+ this . container . appendChild ( this . loader ) ;
20
+
21
+ } ;
22
+
23
+ ClassTree . prototype . removeLoader = function ( ) {
24
+
25
+ if ( ! this . loader ) return ;
26
+ this . loader . parentNode . removeChild ( this . loader ) ;
27
+ this . loader = null ;
9
28
10
29
} ;
11
30
@@ -72,4 +91,6 @@ ClassTree.prototype.updateTree = function (treeObject) {
72
91
73
92
build ( this . container , treeObject ) ;
74
93
94
+ this . removeLoader ( ) ;
95
+
75
96
} ;
You can’t perform that action at this time.
0 commit comments