2009-09-14 3 views
0

나는 요소를 드래그 가능하게하고 크기를 재조정 할 수있게하려는 문제가 있습니다. 태그를 삭제 한 후에도 크기를 조정할 수 있습니다.크기를 재조정 할 수있는 jquery 크롬

function DivMouseDown(id) 
{ 
    try { 
    jQuery('#'+ id).draggable({ 
    opacity: 0.5, 
    revert: 'invalid' 
    }); 
    } catch (e) { 
    alert ("exception in DIVmouse down: "+ e); 
    } 

    try { 
    jQuery('#droppable').droppable({ 
     drop: function(ev,ui) { 
     var type = jQuery(ui.draggable).attr("tagtype"); 
     id = jQuery(ui.draggable).attr("id"); 
     if(document.getElementById(id) != null) { 
      var tagStatus = document.getElementById(id).getAttribute('newtag'); 
      var idTemp = Math.floor(Math.random()*1000); 

      if(tagStatus == 'new') 
      { 
      //Create new div at the same place and replace this tag status. 
      var divId = document.getElementById(id); 
      divId.setAttribute('newtag','old'); 
      divId.setAttribute('id',idTemp); 
      CreateWorkboardDiv('html comment', type); 
      jsmarty = WMCreateSmartyObject(); 
      divValue = WMSmartyFetch(jsmarty, 'edit_menu.tpl'); 
      document.getElementById(divId.id).innerHTML = divValue; 
      jsmarty.clear_all_assign(); 
      //Open Edit box. 
      CollabobaTagCreate(divId.id,type,0);  
      } 
      else 
      { 
      //drag on board div. 
      //Nishima-10-09-09 
      var position = new Array(); 
      position['left'] = document.getElementById(id).offsetParent.offsetLeft + document.getElementById(id).offsetLeft; 
      position['top'] = document.getElementById(id).offsetParent.offsetTop + document.getElementById(id).offsetTop; 
      position['width'] = document.getElementById(id).offsetWidth; 
      position['height'] = document.getElementById(id).offsetHeight; 
      position['zindex'] = jQuery('#' + id).css('zIndex'); 
      var stickyid = document.getElementById(id).getAttribute('stickyId'); 
      UpdateStickyPosition(position,stickyid); 
      //Nishima-10-09-09 
      } 
     } 
     } 
    }); 
    } 
    catch (e) 
    { 
    alert ("exception in DIVmouse down: "+ e); 
    } 
} 

사람이 그것을 삭제 한 후 내 요소 reziable을 만들 수있는 방법을 말해 줄 수있는 몇 가지 샘플 코드입니다. 위의 코드 태그에서 끌어서 놓기가 완벽하게 작동하지만, Chrome에서 요소의 크기를 조절할 수 있도록 추가 할 수있는 항목은 무엇입니까?

감사

이 질문에
+0

당신의 질문은 무엇입니까? – rahul

답변

관련 문제