|
|
@@ -32,7 +32,7 @@ o2.xDesktop.Default = new Class({
|
|
|
if (layout.userLayout.scale){
|
|
|
var s = (1/layout.userLayout.scale)*100;
|
|
|
var p = s+"%";
|
|
|
- document.body.setStyles({
|
|
|
+ document.id(document.documentElement).setStyles({
|
|
|
"transform": "scale("+layout.userLayout.scale+")",
|
|
|
"transform-origin": "0 0",
|
|
|
"width": p,
|
|
|
@@ -47,75 +47,9 @@ o2.xDesktop.Default = new Class({
|
|
|
var scaleP = Math.round(layout.userLayout.scale*100);
|
|
|
if (this.zoomValueNode) this.zoomValueNode.set("text", scaleP+"%");
|
|
|
},
|
|
|
-
|
|
|
- // resizeScale: function(){
|
|
|
- // if (layout.scale!==1){
|
|
|
- // var node = document.body.getFirst();
|
|
|
- // while (node){
|
|
|
- // this.resizeScaleNode(node);
|
|
|
- // node = node.getNext();
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // setStyleValue: function(v, node, key){
|
|
|
- // if (node.hasClass("layout_menu_lnk_item")){
|
|
|
- // debugger;
|
|
|
- // }
|
|
|
- // if (v && v.indexOf("%")==-1){
|
|
|
- // var u = v.substr(v.length-2, v.length);
|
|
|
- // var o = v.substr(0, v.length-2);
|
|
|
- // if (o!=0){
|
|
|
- // o = o.toFloat()*(1/layout.scale);
|
|
|
- // node.setStyle(key, o+u);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // resizeScaleNode: function(node){
|
|
|
- // //var style = node.getStyles("width", "height", "min-width", "min-height");
|
|
|
- // //this.setStyleValue(node.getStyle("width"), node, "width");
|
|
|
- // this.setStyleValue(node.getStyle("height"), node, "height");
|
|
|
- // //this.setStyleValue(node.getStyle("min-width"), node, "min-width");
|
|
|
- // this.setStyleValue(node.getStyle("min-height"), node, "min-height");
|
|
|
- //
|
|
|
- // //this.setStyleValue(node.getStyle("padding-left"), node, "padding-left");
|
|
|
- // //this.setStyleValue(node.getStyle("padding-top"), node, "padding-top");
|
|
|
- // //this.setStyleValue(node.getStyle("padding-right"), node, "padding-right");
|
|
|
- // //this.setStyleValue(node.getStyle("padding-bottom"), node, "padding-bottom");
|
|
|
- //
|
|
|
- // // this.setStyleValue(node.style.paddingLeft, node, "padding-left");
|
|
|
- // // this.setStyleValue(node.style.paddingTop, node, "padding-top");
|
|
|
- // // this.setStyleValue(node.style.paddingRight, node, "padding-right");
|
|
|
- // // this.setStyleValue(node.style.paddingBottom, node, "padding-bottom");
|
|
|
- //
|
|
|
- // // if (v && v.indexOf("%")==-1)
|
|
|
- // //
|
|
|
- // // Object.keys(style).each(function(key){
|
|
|
- // // var v = style[key];
|
|
|
- // // if (v.indexOf("%")==-1){
|
|
|
- // // debugger;
|
|
|
- // // var u = v.substr(v.length-2, v.length);
|
|
|
- // // var o = v.substr(0, v.length-2);
|
|
|
- // // o = o.toFloat()*(1/layout.scale);
|
|
|
- // // node.setStyle(key, o+u);
|
|
|
- // // }
|
|
|
- // // // var v = *(1/layout.scale);
|
|
|
- // // // node.setStyle(key, v)
|
|
|
- // // }.bind(this));
|
|
|
- //
|
|
|
- // // if (style.height.indexOf("%")!=-1){
|
|
|
- // // alert(style.height);
|
|
|
- // // }
|
|
|
- //
|
|
|
- // var sub = node.getFirst();
|
|
|
- // if (sub) this.resizeScaleNode(sub);
|
|
|
- //
|
|
|
- // // while (sub) {
|
|
|
- // // this.resizeScaleNode(sub);
|
|
|
- // // var sub = sub.getFirst();
|
|
|
- // // }
|
|
|
- // var next = node.getNext();
|
|
|
- // if (next) this.resizeScaleNode(next);
|
|
|
- // },
|
|
|
+ returnZoom: function(){
|
|
|
+ this.zoom(1);
|
|
|
+ },
|
|
|
|
|
|
initialize: function(node, options){
|
|
|
this.setOptions(options);
|