File: Redimensionne.js

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (56 lines) | stat: -rw-r--r-- 1,389 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/** Redimensionne.js
  Permet de redimensionner un element en "tirant" dessus avec la souris.
  Utilisé au départ pour les textarea, mais cela devient obsolete, les navigateurs le gérant nativement.
  ==> Inutilisé pour le moment ?
*/

function BottomMove(newPos, element)
{
  DoHeight(newPos.Y, element);
}

function RightMove(newPos, element)
{
  DoWidth(newPos.X, element);
}

function CornerMove(newPos, element)
{
  DoHeight(newPos.Y, element);
  DoWidth(newPos.X, element);
}

function DoHeight(y, element)
{
  //textDiv.style.height = (y + 5) + 'px';

  //if(element != handleCorner)
    //handleCorner.style.top = y + 'px';

  //handleRight.style.height = y + 'px';

  if(element != handleBottom)
    handleBottom.style.top = y + 'px';
  wims_deposit_id.style.height = (y - 19) + 'px';

}

function DoWidth(x, element)
{
  var decalage = 2;
  /*textDiv.style.width =  (x + 5) + 'px';*/

  if(element != handleCorner)
    handleCorner.style.left = x + 'px';

  if(element != handleRight)
    handleRight.style.left = x + 'px';

  handleBottom.style.width = x + 'px';
  // handleBottom.style.top = redim_div.style.height + 'px';
  handleBottom.style.top = redim_div.style.height;
  //alert(redim_div.style.height);
  redim_div.style.width = (x - decalage) + 'px';
  enev_menu.style.width = (x - decalage) + 'px';
  //enev_menu.style.width = wims_deposit_id.offsetHeight + 'px';
}