/lenasys/0.1

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

« back to all changes in this revision

Viewing changes to trunk/CodeViewer/Codeviewer/showcode copy.js

  • Committer: gustav.hartvigsson at gmail
  • Date: 2013-04-02 13:00:31 UTC
  • mfrom: (4.7.8 GammaBear)
  • Revision ID: gustav.hartvigsson@gmail.com-20130402130031-442y89s0cfzmw3r2
Merged stuff.

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
 
                        }