Check this code that is currently in Move.js. (qx.fx.effect.core.Move)
It takes in count the fact that the widgets has a parent object.
What do you think?

    setup : function()
    {
      var element = this._getElement();
      this.base(arguments);

      if(element.parentNode)  <------------------------
      {
        this.__originalLeft =
          qx.bom.element.Location.getLeft(element) -
          qx.bom.element.Location.getLeft(element.parentNode);

        this.__originalTop =
          qx.bom.element.Location.getTop(element) -
          qx.bom.element.Location.getTop(element.parentNode);
      }
      else
      {
        this.__originalLeft = qx.bom.element.Location.getLeft(element);
        this.__originalTop = qx.bom.element.Location.getTop(element);
      }
      this.__originalPosition = qx.bom.element.Style.get(element,
"position");

      qx.bom.element.Style.set(element, "position", "absolute");

      if (this.getMode() == 'absolute')
      {
        this.__x = this.getX() - this.__originalLeft;
        this.__y = this.getY() - this.__originalTop;
      }
      else
      {
        this.__x = this.getX();
        this.__y = this.getY();
      }
    },


-----
la vida es una incesante cadena de oportunidades para aprender y triunfar.
life is an endless chain of opportunities to learn and succeed.

lo más importante: ser selectivo, responsable y perseverante.
the most importantly: to be selective, responsible and persevering.
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/problem-animating-a-widget-tp6621553p6621954.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to