/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: Erik Wikström
  • Date: 2013-04-09 09:21:05 UTC
  • mto: (21.1.1 lenasys)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: wikxen@gmail.com-20130409092105-u1u3gxbql1vx65a7
Added missing WebGL javascript files, moved bothe them and the existing ones to /js. Updated references

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'