Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3425 obado 1
 
2
var wims_deposit = document.getElementById("wims_deposit");
3
var handleRight = document.getElementById("handleRight");
4
var handleCorner = document.getElementById("handleCorner");
5
var handleBottom = document.getElementById("handleBottom");
6
var textDiv = document.getElementById("textDiv");
7
 
8
new dragObject(handleRight, null, new Position(15, 0), new Position(800, 0), null, RightMove, null, false);
9
new dragObject(handleBottom, null, new Position(0, 15), new Position(0, 500), null, BottomMove, null, false);
10
new dragObject(handleCorner, null, new Position(15, 15), new Position(800, 800), null, CornerMove, null, false);
11
 
12
function BottomMove(newPos, element)
13
{
14
  DoHeight(newPos.Y, element);
15
}
16
 
17
function RightMove(newPos, element)
18
{
19
  DoWidth(newPos.X, element);
20
}
21
 
22
function CornerMove(newPos, element)
23
{
24
  DoHeight(newPos.Y, element);
25
  DoWidth(newPos.X, element);
26
}
27
 
28
function DoHeight(y, element)
29
{
30
  textDiv.style.height = (y + 5) + 'px';
31
 
32
  if(element != handleCorner)
33
    handleCorner.style.top = y + 'px';
34
 
35
  handleRight.style.height = y + 'px';
36
 
37
  if(element != handleBottom)
38
    handleBottom.style.top = y + 'px';
39
 
40
  wims_deposit.style.height = (y - 19) + 'px';
41
}
42
 
43
function DoWidth(x, element)
44
{
45
  textDiv.style.width =  (x + 5) + 'px';
46
 
47
  if(element != handleCorner)
48
    handleCorner.style.left = x + 'px';
49
 
50
  if(element != handleRight)
51
    handleRight.style.left = x + 'px';
52
 
53
  handleBottom.style.width = x + 'px';
54
 
55
  wims_deposit.style.width = (x - 5) + 'px';