plok77
Aug 05, 2021, 4:42 PM
The following code fragment should display a Dashboard component where the 5th column (the one that contains 'Widget 5') should span the entire width of its container. However, instead it only spans the width of the 4th column (the one that contains 'Widget 4').
Ext.define('Fiddle.Dashboard', {
extend: 'Ext.dashboard.Dashboard',
xtype: 'simple-dash',
renderTo: document.body,
maxColumns: 4,
columnWidths: [0.55, 0.45, 0.4, 0.6, 1],
parts: {
widget: {
viewTemplate: {
title: '{title}',
html: 'Widget 1'
}
}
},
defaultContent: [
{
title: 'Widget 1',
type: 'widget',
columnIndex: 0
},
{
title: 'Widget 2',
columnIndex: 1,
type: 'widget'
},
{
title: 'Widget 3',
columnIndex: 2,
type: 'widget'
},
{
title: 'Widget 4',
type: 'widget',
columnIndex: 3
},
{
title: 'Widget 5',
type: 'widget',
columnIndex: 4
}]
})
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.container.Container', {
plugins: ['viewport'],
layout: 'border',
items: [{
xtype: 'simple-dash',
region: 'center'
}]
})
Expected:
25549
Actual:
25550
If you reposition Widget 5 so that it occupies the full width of column 5 and then check the state of the component, it will report the column widths as the amounts shown above. However there appears to be a bug that is preventing this layout from being displayed as expected.
Regards
Paul
Ext.define('Fiddle.Dashboard', {
extend: 'Ext.dashboard.Dashboard',
xtype: 'simple-dash',
renderTo: document.body,
maxColumns: 4,
columnWidths: [0.55, 0.45, 0.4, 0.6, 1],
parts: {
widget: {
viewTemplate: {
title: '{title}',
html: 'Widget 1'
}
}
},
defaultContent: [
{
title: 'Widget 1',
type: 'widget',
columnIndex: 0
},
{
title: 'Widget 2',
columnIndex: 1,
type: 'widget'
},
{
title: 'Widget 3',
columnIndex: 2,
type: 'widget'
},
{
title: 'Widget 4',
type: 'widget',
columnIndex: 3
},
{
title: 'Widget 5',
type: 'widget',
columnIndex: 4
}]
})
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.container.Container', {
plugins: ['viewport'],
layout: 'border',
items: [{
xtype: 'simple-dash',
region: 'center'
}]
})
Expected:
25549
Actual:
25550
If you reposition Widget 5 so that it occupies the full width of column 5 and then check the state of the component, it will report the column widths as the amounts shown above. However there appears to be a bug that is preventing this layout from being displayed as expected.
Regards
Paul