Subversion Repositories wimsdev

Rev

Rev 3524 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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. */
  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. {
  25.   //textDiv.style.height = (y + 5) + 'px';
  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.  
  35.   wims_deposit_id.style.height = (y - 19) + 'px';
  36.  
  37. }
  38.  
  39. function DoWidth(x, element)
  40. {
  41.         var decalage = 2;
  42.   /*textDiv.style.width =  (x + 5) + 'px';*/
  43.  
  44.   if(element != handleCorner)
  45.     handleCorner.style.left = x + 'px';
  46.  
  47.   if(element != handleRight)
  48.     handleRight.style.left = x + 'px';
  49.  
  50.   handleBottom.style.width = x + 'px';
  51.  // handleBottom.style.top = redim_div.style.height + 'px';
  52.   handleBottom.style.top = redim_div.style.height;
  53. //alert(redim_div.style.height);
  54.   redim_div.style.width = (x - decalage) + 'px';
  55.   enev_menu.style.width = (x - decalage) + 'px';
  56.   //enev_menu.style.width = wims_deposit_id.offsetHeight + 'px';
  57.  
  58.  
  59. }