Vishal Khunt Vishal Khunt - 2 months ago 14
Vb.net Question

Sencha extjs layout issue with chrome version 52 + Vb.net

When I am using width in percentage or float for sencha extjs panel, then set left position and width in scientific notation by sencha extjs.
Also i used extjs with Vb.net framework.

See screenshot

Please See here for Screenshot of this problem

Can you please provide solution for this problem ?

Answer

Issue has been solved,

change some functionality on "writeProps: function(dirtyProps, flushing)" function

First Change: change

x = Math.round(dirtyProps.x) and y = Math.round(dirtyProps.y)

instead of

x = dirtyProps.x and y = dirtyProps.y

Second change:

target.setPosition(Math.round(x || me.props.x), Math.round(y || me.props.y)) instead of target.setPositionx || me.props.x, y || me.props.y)

Also you need to change bellow function

convertPosition: function (pos, withUnits) { var ret = {}, El = Ext.Element;

if (pos.hasX) {
    ret.left = withUnits ? El.addUnits(pos.x) : pos.x;
    ret.left = Math.round(ret.left);            
}
if (pos.hasY) {
    ret.top = withUnits ? El.addUnits(pos.y) : pos.y;
    r**et.top = Math.round(ret.top);**
}

instead of

convertPosition: function (pos, withUnits) { var ret = {}, El = Ext.Element;

if (pos.hasX) {
    ret.left = withUnits ? El.addUnits(pos.x) : pos.x;
    ret.left = ret.left;            
}
if (pos.hasY) {
    ret.top = withUnits ? El.addUnits(pos.y) : pos.y;
    ret.top = ret.top;
}