/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: Gustav Hatvigsson
  • Date: 2013-05-30 12:08:07 UTC
  • mfrom: (129 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 131.
  • Revision ID: gustav.hartvigsson@gmail.com-20130530120807-q2mad1xrq003ss2n
merged from trunk

Show diffs side-by-side

added added

removed removed

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