【问题标题】:Why does my layout not extend to the bottom of the window when percentages or floats are used?chrome 52 + Vb.net 的 Sencha extjs 布局问题
【发布时间】:2017-01-03 00:17:03
【问题描述】:

当我为sencha extjs面板使用百分比宽度或浮动时,然后通过sencha extjs以科学计数法设置左侧位置和宽度。 我也将 extjs 与 Vb.net 框架一起使用。

看截图

你能提供这个问题的解决方案吗?

【问题讨论】:

  • 能否请您输入一些代码或制作 jsfiddle 以帮助我们更好地理解您的代码。
  • 我为 sencha 生成了 json (pageInfo) 作为 dynamic 。并用页面缩小 json。 sencha 渲染代码: ss.onReady(function() { document.body.id = 'editpage'; Ext.getBody().addCls('editPage'); PageDef = new ss.PageDefination(pageInfo) });根据代码,我以百分比添加 div 宽度。并且 sencha 在科学记数法中添加了左侧位置。像 "left: 6.035654e+10px" 也请注意这个问题只在 chrome 版本 52 中引入。与 chrome 旧版本一起工作正常。
  • 它与 chrome 52 不兼容是吗?
  • 是的,它与 chrome 52 不兼容。但与 chrome 37 兼容。
  • 如果是这种情况,请放置此 并检查。我指的是stackoverflow.com/questions/22059060/…

标签: vb.net extjs sencha-architect chromev52


【解决方案1】:

更改了 ext-all-debug.js 中的波纹管功能

beforeSetPosition: function (x, y, animate) {
    var pos, x0;

    //change start here
    x = parseInt(x);
    y = parseInt(y);
    //change end here        

    if (!x || Ext.isNumber(x)) {
        pos = { x: x, y : y, anim: animate };
    } else if (Ext.isNumber(x0 = x[0])) { 
        pos = { x : x0, y : x[1], anim: y };
    } else {
        pos = { x: x.x, y: x.y, anim: y }; 
    }

    pos.hasX = Ext.isNumber(pos.x);
    pos.hasY = Ext.isNumber(pos.y);


    this.x = pos.x;
    this.y = pos.y;

    return (pos.hasX || pos.hasY) ? pos : null;
},

而不是

beforeSetPosition: function (x, y, animate) {
    var pos, x0;

    if (!x || Ext.isNumber(x)) {
        pos = { x: x, y : y, anim: animate };
    } else if (Ext.isNumber(x0 = x[0])) { 
        pos = { x : x0, y : x[1], anim: y };
    } else {
        pos = { x: x.x, y: x.y, anim: y }; 
    }

    pos.hasX = Ext.isNumber(pos.x);
    pos.hasY = Ext.isNumber(pos.y);


    this.x = pos.x;
    this.y = pos.y;

    return (pos.hasX || pos.hasY) ? pos : null;
},

【讨论】:

    【解决方案2】:

    您必须更改xyparseInt 值。否则你需要更新你的浏览器52以上的chrome版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-10
      • 2022-10-04
      • 2011-01-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多