This project is archived and is in readonly mode.

#56 ✓invalid
Thomas Aylott

Drag.Base problem with option 'grid' and 'container'

Reported by Thomas Aylott | May 28th, 2008 @ 10:06 AM

Originally posted on Trac by Lasse

Original Trac Ticket

Description

When using the Drag.Base class, and the container element is has a margin of 30px, and the grid is set to 20px, it is possible for the dragged element to go out of the dimensions of the container element, but only on the left and top. Of course is it neccasery to set the position-propery to 'absolute' to see this bug.

Here an example (try to drag the yellow element out of the red element on the left and top):


    	Mootools Drag.Base bug example

			window.addEvent('domready', function(){
			    new Drag.Move('move', {'container': 'container', 'grid': 20,});
			});

			* {
			    margin: 0;
			    padding: 0;
			}
			div#container {
			    width: 480px;
			    height: 480px;
			    margin: 30px;
			    background: red;
			}
			div#move {
			    width: 50px;
			    height: 50px;
			    background: yellow;
			    position: absolute;
			}

Trac Attachments

Trac Comments

Changed 2 months ago by Lasse


        
I'm sorry, I've made a mistake. It should be Drag.Move instead of Drag.Base. 

      

Changed 2 weeks ago by tomocchino


        
Confirmed, thanks for the report and the test case.  The problem seems to be that the grid starts at the top left of the document and not the top left of the container.  We will revamp most of the plugins after the 1.2 release and i will address this issue. 

                  Changed 2 weeks ago by tomocchino

          milestone
              changed from Mootools version 1.2 to Mootools version 1.3

Confirmed, thanks for the report and the test case.  The problem seems to be that the grid starts at the top left of the document and not the top left of the container.  We will revamp most of the plugins after the 1.2 release and i will address this issue. 

          milestone
              changed from Mootools version 1.2 to Mootools version 1.3
        
      

Changed 2 weeks ago by tomocchino



                  Changed 2 weeks ago by tomocchino

          owner
            deleted
        
          component
              changed from Core to Plugins
        
          milestone
              set to Mootools version 1.3

          owner
            deleted
        
          component
              changed from Core to Plugins
        
          milestone
              set to Mootools version 1.3
        
      

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Tags

Pages