cheerq / flexmdi

Automatically exported from code.google.com/p/flexmdi
0 stars 0 forks source link

MDIWindow laid inside a MDICanvas using constraint layout drag returns to orig position #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define a MDICanvas class and insert a MDIWindow laying out the 
component in MXML.
2. Add constraint on the MDIWindow component.
3. When running the APP and u try to drag the MDIWindow component it 
always returns to the orignal position.

What is the expected output? It should move to the new position that you 
drag the window to. What do you see instead? The MDIWindow component 
returns to the original position instead staying where it was dragged to. 
If you maximize the MDIWindow componnent first then restore it and do a 
drag it will work correctly and stay where the MDIWindow was dropped to.

e.g. 
<flexmdi:MDICanvas id="mdic" width="500" height="500">
    <flexmdi:MDIWindow width="48%" height="48%" top="0" left="10" 
         id="panel1" title="panel1" />
    <mx:Spacer width="1%"/>

    <flexmdi:MDIWindow width="48%" height="48%" right="0" 
        top="0" id="panel2" title="panel2" />
    <flexmdi:MDIWindow width="48%" height="48%" bottom="0" 
        left="10" id="panel3" title="panel3"/>

    <mx:Spacer width="1%"/>

    <flexmdi:MDIWindow width="48%" height="48%" right="0" bottom="0"
         id="panel4" title="panel4" />       
</flexmdi:MDICanvas>

What version of the product are you using?FLEX 2.01 On what operating 
system? WINXP

Please provide any additional information below.

Original issue reported on code.google.com by vince.ja...@gmail.com on 25 Sep 2007 at 2:01

GoogleCodeExporter commented 8 years ago
Constraints are now cleared when dragging begins. Future version may support
enforcing constraints during drag.

Original comment by ben.clin...@gmail.com on 25 Sep 2007 at 4:41

GoogleCodeExporter commented 8 years ago
Could please explain how you cleared the constraints. I tried to do "this.top = 
null" for example and the compiler returned an error "1119: Access of possibly 
undefined property top through a reference with static type 
dashboard.view.flexmdi.containers:MDIWindow."

Any help appreciate it.

Original comment by vince.ja...@gmail.com on 25 Sep 2007 at 2:12

GoogleCodeExporter commented 8 years ago
top, right, bottom and left are actually styles, so I used clearStyle() in the
onWindowMove() method of MDIWindow. Latest source can (always) be seen here:
http://flexmdi.googlecode.com/svn/trunk/src/flexmdi/containers/MDIWindow.as

Original comment by ben.clin...@gmail.com on 26 Sep 2007 at 12:35

GoogleCodeExporter commented 8 years ago
OK I understand now, thanks for all the help.

Original comment by vince.ja...@gmail.com on 26 Sep 2007 at 12:52