[pve-devel] [PATCH 1/2] Fix a bug where the autoloading of syslog entries was not working.
Dietmar Maurer
dietmar at proxmox.com
Mon Jun 8 17:24:33 CEST 2015
>From what I see, setStyle still works as expected, but you need to
pass the unit. For example the following works for me:
- el.setStyle('padding-top', start*me.lineHeight);
+ el.setStyle('padding-top', start*me.lineHeight + 'px');
I found the following ways to set the style correctly:
el.dom.style['padding-top'] = start*me.lineHeight + 'px';
el.applyStyles('padding-top: ' + start*me.lineHeight + 'px');
el.setStyle({ 'padding-top': start*me.lineHeight + 'px' });
el.setStyle('padding-top', start*me.lineHeight + 'px');
not sure what is best to use? But applyStyles is probably the slowest one, so
I would like to avoid that.
> On June 8, 2015 at 1:18 PM Emmanuel Kasper <e.kasper at proxmox.com> wrote:
>
>
> It looks that after adding the <!DOCTYPE html> HTML5 doctype,
> setStyle() is not working properly with ExtJS4, although is is
> the recommended doctype.
> Hence we switch to applyStyles() instead of setStyle().
> ---
> www/manager/panel/LogView.js | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/www/manager/panel/LogView.js b/www/manager/panel/LogView.js
> index d9dbcb3..6e00a97 100644
> --- a/www/manager/panel/LogView.js
> +++ b/www/manager/panel/LogView.js
> @@ -39,7 +39,11 @@ Ext.define('PVE.panel.LogView', {
> var maxDown = me.getMaxDown();
> var scrollToEnd = (maxDown <= 0) && me.scrollToEnd;
>
> - el.setStyle('padding-top', start*me.lineHeight);
> + // set a hidden padding above of visibles log entries
> + // needed for background rescrolling when new log entries appear
> + var paddingTop = start*me.lineHeight;
> + el.applyStyles('padding-top: ' + paddingTop + 'px');
> +
> el.update(text);
> me.dataCmp.setHeight(total*me.lineHeight);
>
> --
> 2.1.4
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list