/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to CodeViewer/codeviewer.js

  • Committer: mattman-03
  • Date: 2013-04-05 08:23:42 UTC
  • mto: (19.4.1 lenasys)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: mattman-03-20130405082342-ahe7pvccqfwdpwoq
bugg fixed, Code standard fixed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
                       var mb=0;
2
 
                        var panelwidth=450;
3
 
                        var mx,my;
4
 
 
5
 
                        function resize() {
6
 
                document.getElementById("bottom").style.height = (document.body.clientHeight - 44) + "px";
7
 
                document.getElementById("panel").style.height = (document.body.clientHeight - 44) + "px";
8
 
                        }                       
9
 
                        
10
 
                        function resizepanel(ev)
11
 
                        {
12
 
 
13
 
                                        var panel=document.getElementById('panel');
14
 
 
15
 
                                  if (ev.layerX||ev.layerX==0) { // Firefox
16
 
                                            mx=ev.layerX-panel.offsetLeft;
17
 
                                            my=ev.layerY-panel.offsetTop;
18
 
                                  } else if (ev.offsetX || ev.offsetX == 0) { // Opera
19
 
                                            mx=ev.offsetX-panel.offsetLeft;
20
 
                                            my=ev.offsetY-panel.offsetTop;
21
 
                                  }                     
22
 
 
23
 
                                        if((mx>(panelwidth-4))&&(mx<(panelwidth+4))){
24
 
                                                        panel.style.cursor="col-resize";                                        
25
 
                                        }else{
26
 
                                                        panel.style.cursor="default";
27
 
                                        }
28
 
                                  
29
 
                                  if(mb){
30
 
                                                panel.style.width=mx+4;
31
 
                                                panelwidth=mx+4;
32
 
                                                        panel.style.cursor="col-resize";
33
 
                                                return false;
34
 
                                  }else{
35
 
                                                return true;
36
 
                                  }
37
 
                                  
38
 
                        }
39
 
                        
40
 
                        function mdpanel(ev)
41
 
                        {
42
 
                                        if((mx>(panelwidth-4))&&(mx<(panelwidth+4))) mb=1;                      
43
 
                        }
44
 
                        
45
 
                        function mupanel(ev)
46
 
                        {
47
 
                                        mb=0;
48
 
                        }
 
1
var mb = 0;
 
2
var panelwidth = 450;
 
3
var mx, my;
 
4
 
 
5
function resize() {
 
6
        document.getElementById( "bottom" ).style.height = ( document.body.clientHeight - 44 ) + "px";
 
7
        document.getElementById( "panel" ).style.height = ( document.body.clientHeight - 44 ) + "px";
 
8
}                       
 
9
 
 
10
function resizePanel(ev) {
 
11
        var panel =     document.getElementById('panel');
 
12
        // Firefox
 
13
        if(ev.layerX || ev.layerX == 0) {
 
14
                mx = ev.layerX - panel.offsetLeft;
 
15
                my = ev.layerY - panel.offsetTop;
 
16
        //Opera
 
17
        } else if(ev.offsetX || ev.offsetX == 0) {
 
18
                mx = ev.offsetX - panel.offsetLeft;
 
19
                my = ev.offsetY - panel.offsetTop;
 
20
        }                       
 
21
        if(( mx > (panelwidth - 4)) && ( mx < ( panelwidth + 4) )) {
 
22
                panel.style.cursor = "col-resize";                                      
 
23
        } else {
 
24
                panel.style.cursor = "default";
 
25
        }
 
26
        if( mb ) {
 
27
                panel.style.width = mx + 4;
 
28
                panelwidth = mx + 4;
 
29
                panel.style.cursor = "col-resize";
 
30
                return false;
 
31
        } else {
 
32
                return true;
 
33
        }
 
34
}
 
35
 
 
36
function mdPanel(ev) {
 
37
        if(( mx > ( panelwidth-4 )) && ( mx < ( panelwidth + 4 ))) {
 
38
                mb = 1;
 
39
        }
 
40
}
 
41
 
 
42
function muPanel(ev) {
 
43
        mb = 0;
 
44
}
 
 
b'\\ No newline at end of file'