Subversion Repositories wimsdev

Rev

Rev 6975 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6975 obado 1
/** Redimensionne.js
2
  Permet de redimensionner un element en "tirant" dessus avec la souris.
3
  Utilisé au départ pour les textarea, mais cela devient obsolete, les navigateurs le gérant nativement.
4
  ==> Inutilisé pour le moment ?
5
*/
3425 obado 6
 
7
function BottomMove(newPos, element)
8
{
9
  DoHeight(newPos.Y, element);
10
}
11
 
12
function RightMove(newPos, element)
13
{
14
  DoWidth(newPos.X, element);
15
}
16
 
17
function CornerMove(newPos, element)
18
{
19
  DoHeight(newPos.Y, element);
20
  DoWidth(newPos.X, element);
21
}
22
 
23
function DoHeight(y, element)
24
{
3524 obado 25
  //textDiv.style.height = (y + 5) + 'px';
3425 obado 26
 
27
  //if(element != handleCorner)
28
    //handleCorner.style.top = y + 'px';
29
 
30
  //handleRight.style.height = y + 'px';
31
 
32
  if(element != handleBottom)
33
    handleBottom.style.top = y + 'px';
34
  wims_deposit_id.style.height = (y - 19) + 'px';
14282 obado 35
 
3425 obado 36
}
37
 
38
function DoWidth(x, element)
39
{
14282 obado 40
  var decalage = 2;
3425 obado 41
  /*textDiv.style.width =  (x + 5) + 'px';*/
42
 
43
  if(element != handleCorner)
44
    handleCorner.style.left = x + 'px';
45
 
46
  if(element != handleRight)
47
    handleRight.style.left = x + 'px';
48
 
49
  handleBottom.style.width = x + 'px';
14282 obado 50
  // handleBottom.style.top = redim_div.style.height + 'px';
3425 obado 51
  handleBottom.style.top = redim_div.style.height;
14282 obado 52
  //alert(redim_div.style.height);
3425 obado 53
  redim_div.style.width = (x - decalage) + 'px';
54
  enev_menu.style.width = (x - decalage) + 'px';
55
  //enev_menu.style.width = wims_deposit_id.offsetHeight + 'px';
56
}