/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: a11vikob
  • Date: 2013-04-05 08:08:29 UTC
  • mto: (19.4.2 lenasys)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: a11vikob@student.his.se-20130405080829-roolb0deaso3gmvb
Fixed hopefully everything in Bug #1164597

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
var mb = 0;
2
 
var panelwidth = 450;
3
 
var mx, my;
 
2
var panelWidth = 450;
 
3
var mx;
 
4
var my;
4
5
 
5
6
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
 
}                       
 
7
        document.getElementById("bottom").style.height = (document.body.clientHeight - 44) + "px";
 
8
        document.getElementById("panel").style.height = (document.body.clientHeight - 44) + "px";
 
9
}
9
10
 
10
11
function resizePanel(ev) {
11
12
        var panel =     document.getElementById('panel');
18
19
                mx = ev.offsetX - panel.offsetLeft;
19
20
                my = ev.offsetY - panel.offsetTop;
20
21
        }                       
21
 
        if(( mx > (panelwidth - 4)) && ( mx < ( panelwidth + 4) )) {
 
22
        if((mx > (panelWidth - 4)) && ( mx < (panelWidth + 4) )) {
22
23
                panel.style.cursor = "col-resize";                                      
23
24
        } else {
24
25
                panel.style.cursor = "default";
25
26
        }
26
 
        if( mb ) {
 
27
        if(mb) {
27
28
                panel.style.width = mx + 4;
28
 
                panelwidth = mx + 4;
 
29
                panelWidth = mx + 4;
29
30
                panel.style.cursor = "col-resize";
30
31
                return false;
31
32
        } else {
34
35
}
35
36
 
36
37
function mdPanel(ev) {
37
 
        if(( mx > ( panelwidth-4 )) && ( mx < ( panelwidth + 4 ))) {
 
38
        if((mx > (panelWidth-4 )) && (mx < (panelWidth + 4 ))) {
38
39
                mb = 1;
39
40
        }
40
41
}