Forums
View unanswered posts | View active topics It is currently Fri Oct 31, 2014 2:41 pm



Reply to topic  [ 2 posts ] 
 Issues with dragging. 
Author Message

Joined: Tue Jul 20, 2010 7:25 am
Posts: 4
Post Issues with dragging.
Hi,

Just to let you know drag/dropping a div with the pie behaviour is really slow.

My work around is to just turn PIE off when dragging:

tile.style.behavior = "none"

However, when you try to re-add the behaviour it doesn't get removed along with the tile any more:

tile.style.behavior = "/PIE.htc"
document.body.removeChild(tile)

The div is removed, but the css3-container remains.

I have a test case that replicates the div not getting removed issue:

Code:
<!DOCTYPE html>
<html>
   <head>
<style type="text/css">

.a {
  background-color:green;
  border-style:solid;
  border-width:1px;
  border-color:black;
  border-radius:8px;
  behavior: url(/PIE.htc);
  position:absolute;
  width:100px;
  height:100px;
}

</style>

   </head>
   <body>
      <script type='text/javascript'>
       var d1 = document.createElement("div")
       document.body.appendChild(d1)

       var d2 = document.createElement("div")
       document.body.appendChild(d2)
       
       d1.className = "a";
       d2.className = "a";
       
       
       d2.style.left="200px"
       setTimeout(function() {
          d1.style.behavior = "none";
       }, 1000);
       setTimeout(function() {
          d1.style.behavior = "url(/PIE.htc)";
       }, 2000);
       
       setTimeout(function() {
         document.body.removeChild(d2)
       }, 3000);
       setTimeout(function() {
         document.body.removeChild(d1)
       }, 4000);
      </script>
   </body>
</html>


Thu Jul 29, 2010 4:25 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post Re: Issues with dragging.
Hmm, that's a very interesting quirk. I wonder why it's not firing the detach event in that case. Unfortunately behavior attachment/detachment is purely an IE thing so I'm doubtful there's anything that can be done about it programatically, but I'll keep the testcase and look into it at some point.

I'd like to get back to the main issue, though, which is the slow dragging performance. Do you perhaps have a testcase which demonstrates that?


Thu Jul 29, 2010 6:48 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.