Hi Sebastian,

I suspect there is a regression in the MPlacement code. Could you open a 
bug report for this issue. Just attach the contents of the mail.

Best Fabian
> Hello,
>
> I'm testing the new version of qooxdoo 0.8.
>
> The method placeToMouse work well with a widget added to the root
> application
> but inside a layout, the position mouse or the widget isn't correct.
>
>
> How can I move a widget with the mouse inside a layout ?
>
> Thank for your help. 
>
> Sebastien
>
> See the code :
>
> qx.Class.define("test.Application",
> {
>   extend : qx.application.Standalone,
>
>
>
>   /*
>  
> *****************************************************************************
>      MEMBERS
>  
> *****************************************************************************
>   */
>
>   members :
>   {
>     /**
>      * This method contains the initial application code and gets called 
>      * during startup of the application
>      */
>     main: function()
>     {
>       this.base(arguments);
>         
>         var draw = new qx.ui.container.Composite(new qx.ui.layout.Basic());
>         draw.set({width : 520,height:420, decorator : "main"});
>       
>       var bt1 = new test.Button("Button 1");
>       qx.event.Registration.removeAllListeners(bt1);
>  
>       bt1.addListener("mousedown", function(e) { 
>               this.__moveStart = true;
>               this.capture();
>       }, bt1,true);
>       bt1.addListener("mouseup", function (e) {
>               this.__moveStart = false;
>               this.releaseCapture();
>       }, bt1);
>       bt1.addListener("mousemove", function (e) {
>               if ( this.__moveStart ) {
>                       this.placeToMouse(e);
>               }
>       }, bt1);
>
>       
>         draw.add(bt1);
>
>       var bt2 = new test.Button("Button 2");
>       qx.event.Registration.removeAllListeners(bt2);
>  
>       bt2.addListener("mousedown", function(e) { 
>               this.__moveStart = true;
>               this.capture();
>       }, bt2,true);
>       bt2.addListener("mouseup", function (e) {
>               this.__moveStart = false;
>               this.releaseCapture();
>       }, bt2);
>       bt2.addListener("mousemove", function (e) {
>               if ( this.__moveStart ) {
>                       this.placeToMouse(e);
>               }
>       }, bt2);
>
>         this.getRoot().add(bt2,{left:620,top:20});      
>       this.getRoot().add(draw,{left:20,top:20});
>     }
>
>
>   }
> });
>
> qx.Class.define("test.Button",
> {
>
>   extend : qx.ui.form.Button,
>   include :
>   [
>      qx.ui.core.MPlacement
>     
>   ]
> })
>   
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim 
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to