Maybe i'm doing it wrong, but here is how i try to achieve this :

First the modified layoutItem (i remove comment to keep it shorter) :
qx.Class.define("myLayoutItem",
{
  type : "abstract",
  extend : qx.ui.core.LayoutItem,
  properties :
  {
    zoom :
    {
      check : "Number",
      nullable : true,
      apply : "_applyZoom",
      init : 1
    }
  },



  members :{
        _applyZoom:function(value){
                var t = "scale("+value+")";
                var ms = 
"progid:DXImageTransform.Microsoft.Matrix(M11="+value+", M12=0,
M21=0, M22="+value+", SizingMethod='auto expand')";
                //CSS3
                try{
                        
this.getContainerElement().getDomElement().style.transform = t;
                        
this.getContainerElement().getDomElement().style.transformOrigin = "0 0";
                }catch(e){}
                //Firefox > 3.5
                try{
                        
this.getContainerElement().getDomElement().style.MozTransform = t;
                        
this.getContainerElement().getDomElement().style.MozTransformOrigin = "0
0";
                }catch(e){}
                //Chrome & Safari, both > 4
                try{
                        
this.getContainerElement().getDomElement().style.WebkitTransform = t;
                        
this.getContainerElement().getDomElement().style.WebkitTransformOrigin =
"0 0";
                }catch(e){}
                //Opera
                try{
                        
this.getContainerElement().getDomElement().style.OTransform = t;
                        
this.getContainerElement().getDomElement().style.OTransformOrigin = "0
0";
                }catch(e){}
                //IE9
                try{
                        
this.getContainerElement().getDomElement().style.msTransform = t;
                        
this.getContainerElement().getDomElement().style.msTransformOrigin = "0
0";
                }catch(e){}
                //IE8
                try{            
this.getContainerElement().getDomElement().style.zoom = ms;             
}catch(e){}
                //IE8 (slower than zoom)
                //try{          
this.getContainerElement().getDomElement().style.MsFilter = ms;         
}catch(e){}
                //IE7 & 6
                try{            
this.getContainerElement().getDomElement().style.filter = ms;           
}catch(e){}
                this._applyDimension();
        },

    getSizeHint : function(compute)
    {
      var res = this.base(arguments, compute);
          if(res === null){
                return null;
          }
          if(res.width && !isNaN(res.width) && isFinite(res.width)){
                res.width = res.width * this.getZoom();
          }

          //HERE : The same for minWidth, maxWidth, height, minHeight,
maxHeight
         return res;
    }
  }
});




I use this class like this :
qx.Class.patch(qx.ui.window.Desktop, myLayoutItem);
or i also try
qx.Class.patch(qx.ui.core.Widget, myLayoutItem);

and after new qx.ui.window.Desktop => i use setZoom :
Both works for setZoom and getZoom, but applyZoom is always reported as not
defined. The same if applyZoom go into public.



Also if you want to add zoom i got the code ready, i just miss MResizable
code (for now not working good), the MMovable is ok, the layoutItem also (no
bug and i can zoom on many elements).

PS : I shorter lots of code to get a more readable, this may lead to some
error typing...

--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Changing-extend-class-tp7580552p7580569.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to