@refinitiv-ui/efx-grid 6.0.1 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
- package/lib/column-dragging/es6/ColumnDragging.js +764 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +226 -23
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +17835 -16266
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.d.ts +2 -2
- package/lib/core/es6/data/DataCache.d.ts +4 -4
- package/lib/core/es6/data/DataTable.d.ts +5 -5
- package/lib/core/es6/data/DataTable.js +33 -11
- package/lib/core/es6/data/DataView.d.ts +26 -17
- package/lib/core/es6/data/DataView.js +172 -49
- package/lib/core/es6/data/Segment.d.ts +2 -0
- package/lib/core/es6/data/Segment.js +7 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
- package/lib/core/es6/data/WrappedView.d.ts +289 -0
- package/lib/core/es6/data/WrappedView.js +1319 -0
- package/lib/core/es6/grid/Core.d.ts +42 -27
- package/lib/core/es6/grid/Core.js +431 -163
- package/lib/core/es6/grid/ILayoutGrid.d.ts +23 -15
- package/lib/core/es6/grid/ILayoutGrid.js +45 -2
- package/lib/core/es6/grid/LayoutGrid.d.ts +10 -1
- package/lib/core/es6/grid/LayoutGrid.js +311 -108
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +10 -1
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +382 -24
- package/lib/core/es6/grid/components/Cell.d.ts +4 -4
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
- package/lib/core/es6/grid/components/Column.d.ts +1 -1
- package/lib/core/es6/grid/components/Column.js +8 -2
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/core/es6/grid/components/HScrollbar.d.ts +4 -0
- package/lib/core/es6/grid/components/HScrollbar.js +20 -4
- package/lib/core/es6/grid/components/Scrollbar.d.ts +1 -1
- package/lib/core/es6/grid/components/StretchedCells.js +2 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
- package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
- package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
- package/lib/core/es6/grid/util/SectionSettings.js +5 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
- package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
- package/lib/core/es6/grid/util/TrackLayout.js +29 -3
- package/lib/core/es6/grid/util/util.d.ts +2 -2
- package/lib/core/es6/index.d.ts +1 -5
- package/lib/core/es6/index.js +1 -7
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
- package/lib/filter-dialog/lib/filter-dialog.js +94 -32
- package/lib/filter-dialog/themes/base-checkbox.less +8 -1
- package/lib/filter-dialog/themes/base.less +69 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/lib/efx-grid.d.ts +30 -8
- package/lib/grid/lib/efx-grid.js +120 -115
- package/lib/grid/themes/base.less +5 -3
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +72 -41
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +8 -2
- package/lib/row-segmenting/es6/RowSegmenting.js +137 -21
- package/lib/rt-grid/dist/rt-grid.js +11017 -9193
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +9 -4
- package/lib/rt-grid/es6/ColumnDefinition.js +20 -108
- package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
- package/lib/rt-grid/es6/Grid.d.ts +30 -15
- package/lib/rt-grid/es6/Grid.js +436 -167
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +137 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +12 -7
- package/lib/rt-grid/es6/RowDefinition.js +58 -2
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -1
- package/lib/rt-grid/es6/SnapshotFiller.js +23 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +1 -1
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +53 -40
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +6 -3
- package/lib/tr-grid-checkbox/es6/Checkbox.js +79 -34
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +10 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +5 -1
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +269 -10
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +243 -125
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +24 -13
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +4 -2
- package/lib/tr-grid-filter-input/es6/FilterInput.js +73 -10
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
- package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +108 -127
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +88 -33
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +138 -38
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +13 -9
- package/lib/tr-grid-row-selection/es6/RowSelection.js +230 -29
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +2 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +36 -0
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
- package/lib/tr-grid-util/es6/CellPainter.d.ts +8 -8
- package/lib/tr-grid-util/es6/Conflator.d.ts +2 -2
- package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
- package/lib/tr-grid-util/es6/DateTime.d.ts +4 -4
- package/lib/tr-grid-util/es6/Delay.d.ts +1 -1
- package/lib/tr-grid-util/es6/Dom.d.ts +4 -4
- package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
- package/lib/tr-grid-util/es6/DragUI.js +214 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +28 -1
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +1 -1
- package/lib/tr-grid-util/es6/ElfDate.d.ts +3 -3
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +1 -1
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +1 -1
- package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +5 -5
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +3 -3
- package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +1 -1
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +10 -2
- package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
- package/lib/tr-grid-util/es6/PercentBar.d.ts +1 -1
- package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
- package/lib/tr-grid-util/es6/Popup.d.ts +2 -2
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +1 -1
- package/lib/tr-grid-util/es6/RowPainter.d.ts +3 -0
- package/lib/tr-grid-util/es6/RowPainter.js +120 -28
- package/lib/tr-grid-util/es6/SubTable.d.ts +9 -9
- package/lib/tr-grid-util/es6/Table.d.ts +13 -13
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +3 -3
- package/lib/tr-grid-util/es6/TickCodes.d.ts +2 -2
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +1 -1
- package/lib/tr-grid-util/es6/Util.d.ts +6 -6
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +5 -5
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +3 -3
- package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +2 -2
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +4 -4
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +11 -11
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +7 -7
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -1
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/types/es6/CellSelection.d.ts +1 -1
- package/lib/types/es6/Checkbox.d.ts +6 -3
- package/lib/types/es6/ColumnGrouping.d.ts +1 -0
- package/lib/types/es6/ColumnSelection.d.ts +5 -1
- package/lib/types/es6/ColumnStack.d.ts +8 -4
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
- package/lib/types/es6/ConditionalColoring.d.ts +1 -1
- package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
- package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
- package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
- package/lib/types/es6/Core/data/DataView.d.ts +26 -17
- package/lib/types/es6/Core/data/Segment.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
- package/lib/types/es6/Core/data/WrappedView.d.ts +289 -0
- package/lib/types/es6/Core/grid/Core.d.ts +42 -27
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +23 -15
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +10 -1
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +10 -1
- package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
- package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +4 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +1 -1
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
- package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
- package/lib/types/es6/Core/index.d.ts +1 -5
- package/lib/types/es6/ExtensionOptions.d.ts +2 -0
- package/lib/types/es6/FilterInput.d.ts +4 -2
- package/lib/types/es6/InCellEditing.d.ts +8 -5
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +9 -4
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +31 -16
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +12 -7
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -1
- package/lib/types/es6/RowColoring.d.ts +2 -0
- package/lib/types/es6/RowDragging.d.ts +3 -4
- package/lib/types/es6/RowFiltering.d.ts +2 -0
- package/lib/types/es6/RowGrouping.d.ts +7 -2
- package/lib/types/es6/RowSegmenting.d.ts +8 -2
- package/lib/types/es6/RowSelection.d.ts +13 -9
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/types/es6/Zoom.d.ts +2 -1
- package/lib/types/es6/index.d.ts +3 -0
- package/lib/versions.json +22 -21
- package/lib/zoom/es6/Zoom.d.ts +2 -1
- package/lib/zoom/es6/Zoom.js +11 -4
- package/package.json +7 -7
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
- package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
- package/lib/core/es6/grid/plugins/Plugin.js +0 -272
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -88,6 +88,10 @@ var Core = function (opt_initializer) {
|
|
88
88
|
_t._onColInViewChanged = _t._onColInViewChanged.bind(_t);
|
89
89
|
|
90
90
|
_t._updateVScrollbar = _t._updateVScrollbar.bind(_t);
|
91
|
+
_t._updateColumnBounds = _t._updateColumnBounds.bind(_t);
|
92
|
+
_t._dispatchColumnPositionChanged = _t._dispatchColumnPositionChanged.bind(_t);
|
93
|
+
_t._dispatchRowPositionChanged = _t._dispatchRowPositionChanged.bind(_t);
|
94
|
+
_t._requestScrollbarUpdate = _t._requestScrollbarUpdate.bind(_t);
|
91
95
|
|
92
96
|
// Text nodes are unintentionally getting in the tag.
|
93
97
|
if(opt_initializer) { // Any node other than element node is not allowed within the tag.
|
@@ -159,6 +163,9 @@ var Core = function (opt_initializer) {
|
|
159
163
|
_t._colVirtualizer.listen("indexChanged", _t._onColInViewChanged);
|
160
164
|
_t._rowHeightConflator = new Conflator(_t._onRowHeightChanged, 50);
|
161
165
|
_t._vScrollbarConflator = new Conflator(_t._updateVScrollbar, 200);
|
166
|
+
_t._columnBoundConflator = new Conflator(_t._updateColumnBounds, 10);
|
167
|
+
_t._columnPositionConflator = new Conflator(_t._dispatchColumnPositionChanged, 10);
|
168
|
+
_t._rowPositionConflator = new Conflator(_t._dispatchRowPositionChanged, 10);
|
162
169
|
|
163
170
|
// Initialize events for external users
|
164
171
|
_t._addEvents(
|
@@ -179,7 +186,9 @@ var Core = function (opt_initializer) {
|
|
179
186
|
"rowHighlighted",
|
180
187
|
"preForcedUpdate",
|
181
188
|
"rowAdded",
|
182
|
-
"rowRemoved"
|
189
|
+
"rowRemoved",
|
190
|
+
"columnPositionChanged",
|
191
|
+
"rowPositionChanged"
|
183
192
|
);
|
184
193
|
|
185
194
|
// For debugging in advanced optimization mode
|
@@ -276,6 +285,9 @@ Core.CellReference;
|
|
276
285
|
* @property {Function=} renderingHandler - Deprecated
|
277
286
|
* @property {Function=} dataBindingHandler Column binding function
|
278
287
|
* @property {string=} columnData For attaching context (user data)
|
288
|
+
* @property {boolean=} stationary=false If enabled, the column order cannot be changed (i.e., this column and any column to its left cannot be moved)
|
289
|
+
* @property {boolean=} leftPinned=false If enabled, the column will not be part of the scrollable area and is pinned to the left side
|
290
|
+
* @property {boolean=} rightPinned=false If enabled, the column will not be part of the scrollable area and is pinned to the right side
|
279
291
|
* @property {TrackLayout=} layout - Deprecated
|
280
292
|
*/
|
281
293
|
Core.ColumnOptions;
|
@@ -334,14 +346,18 @@ Core.prototype._tempFrozenSectionRef = "";
|
|
334
346
|
* @private
|
335
347
|
*/
|
336
348
|
Core.prototype._startVScrollbarIndex = -1;
|
349
|
+
/** @type {boolean}
|
350
|
+
* @private
|
351
|
+
*/
|
352
|
+
Core.prototype._hScrollbarEnabled = true;
|
337
353
|
/** @type {number}
|
338
354
|
* @private
|
339
355
|
*/
|
340
|
-
Core.prototype.
|
356
|
+
Core.prototype._pinnedLeftColumnCount = 0; // Cached value, that should always the same as the actual value in the UI
|
341
357
|
/** @type {number}
|
342
358
|
* @private
|
343
359
|
*/
|
344
|
-
Core.prototype._pinnedRightColumnCount = 0;
|
360
|
+
Core.prototype._pinnedRightColumnCount = 0; // Cached value, that should always the same as the actual value in the UI
|
345
361
|
/** number of footer that being freeze right now
|
346
362
|
* @type {number}
|
347
363
|
* @private
|
@@ -456,6 +472,14 @@ Core.prototype._hidingMethod = "";
|
|
456
472
|
* @private
|
457
473
|
*/
|
458
474
|
Core.prototype._rowHeightConflator = null;
|
475
|
+
/** @type {Conflator}
|
476
|
+
* @private
|
477
|
+
*/
|
478
|
+
Core.prototype._vScrollbarConflator = null;
|
479
|
+
/** @type {Conflator}
|
480
|
+
* @private
|
481
|
+
*/
|
482
|
+
Core.prototype._columnBoundConflator = null;
|
459
483
|
/** @type {number}
|
460
484
|
* @private
|
461
485
|
*/
|
@@ -485,6 +509,10 @@ Core.prototype._preserveProportion = false;
|
|
485
509
|
* @private
|
486
510
|
*/
|
487
511
|
Core.prototype._preserveGridSize = false;
|
512
|
+
/** @type {number}
|
513
|
+
* @private
|
514
|
+
*/
|
515
|
+
Core.prototype._rowHeightTimerId = 0;
|
488
516
|
//#region Public Methods
|
489
517
|
|
490
518
|
/**
|
@@ -492,7 +520,7 @@ Core.prototype._preserveGridSize = false;
|
|
492
520
|
* @return {string}
|
493
521
|
*/
|
494
522
|
Core.getVersion = function () {
|
495
|
-
return "5.0.
|
523
|
+
return "5.0.58";
|
496
524
|
};
|
497
525
|
/** {@link ElementWrapper#dispose}
|
498
526
|
* @override
|
@@ -537,6 +565,11 @@ Core.prototype.dispose = function () {
|
|
537
565
|
this._vscrollbar.dispose();
|
538
566
|
this._hscrollbar.dispose();
|
539
567
|
this._rowHeightConflator.dispose();
|
568
|
+
this._vScrollbarConflator.dispose();
|
569
|
+
this._columnBoundConflator.dispose();
|
570
|
+
this._columnPositionConflator.dispose();
|
571
|
+
this._rowPositionConflator.dispose();
|
572
|
+
|
540
573
|
|
541
574
|
// Clean Top node
|
542
575
|
var elem = this._element;
|
@@ -606,17 +639,20 @@ Core.prototype.getConfigObject = function (gridOptions) {
|
|
606
639
|
if (columnDef["styles"]) {
|
607
640
|
column["styles"] = columnDef["styles"];
|
608
641
|
}
|
609
|
-
if (columnDef["stationary"]
|
642
|
+
if (columnDef["stationary"]) {
|
610
643
|
column["stationary"] = columnDef["stationary"];
|
611
644
|
}
|
645
|
+
if (columnDef["leftPinned"]) {
|
646
|
+
column["leftPinned"] = columnDef["leftPinned"];
|
647
|
+
}
|
648
|
+
if (columnDef["rightPinned"]) {
|
649
|
+
column["rightPinned"] = columnDef["rightPinned"];
|
650
|
+
}
|
612
651
|
}
|
613
652
|
|
614
653
|
if(this._rowHighlighting) {
|
615
654
|
obj["rowHighlighting"] = true;
|
616
655
|
}
|
617
|
-
if(this._pinnedRightColumnCount) {
|
618
|
-
obj["pinnedRightColumns"] = this._pinnedRightColumnCount;
|
619
|
-
}
|
620
656
|
obj["columnVirtualization"] = this._colVirtualizer.isEnabled();
|
621
657
|
|
622
658
|
if(this._fixFrozenTopSections) {
|
@@ -682,7 +718,7 @@ Core.prototype.fillParentWidth = function(pct) {
|
|
682
718
|
// exceeds expected value by 1px and will cause incorrect scrollbar active frag
|
683
719
|
var el = this._element;
|
684
720
|
var px = (el.getBoundingClientRect().width | 0) - el.clientLeft;
|
685
|
-
var changes = this._layoutX.setTrackSize(px
|
721
|
+
var changes = this._layoutX.setTrackSize(px - this._reservedSpace);
|
686
722
|
return changes !== null;
|
687
723
|
};
|
688
724
|
/** {@link ElementWrapper#show}
|
@@ -803,6 +839,10 @@ Core.prototype.addSectionAt = function (at, opt_type, opt_sectionName) {
|
|
803
839
|
}
|
804
840
|
|
805
841
|
this._updateSectionIndices(at);
|
842
|
+
if (this._autoSetDataSource) {
|
843
|
+
// This could trigger data binding and column virtualization
|
844
|
+
sectionSettings.setDataSource(this._dataSource);
|
845
|
+
}
|
806
846
|
|
807
847
|
sectType = sectionSettings.getType();
|
808
848
|
if (sectType === "footer") {
|
@@ -1302,23 +1342,11 @@ Core.prototype.insertColumn = function (index, jsonObj) {
|
|
1302
1342
|
section.insertColumn(index);
|
1303
1343
|
}
|
1304
1344
|
|
1305
|
-
|
1306
|
-
this.
|
1307
|
-
|
1308
|
-
if (prevCount > 0) {
|
1309
|
-
var leftPinnedCount = this._countPinnedLeftColumns();
|
1310
|
-
if ((index < leftPinnedCount) && (leftPinnedCount < prevCount + 1)) {
|
1311
|
-
// insert into left frozen zone
|
1312
|
-
this.freezeColumn(leftPinnedCount, rightPinnedCount);
|
1313
|
-
} else if (index > (prevCount - rightPinnedCount)) {
|
1314
|
-
// insert into right frozen zone
|
1315
|
-
this.freezeColumn(leftPinnedCount - 1, rightPinnedCount + 1);
|
1316
|
-
}
|
1317
|
-
}
|
1345
|
+
this._columnDefs.splice(index, 0, null); // TODO: Always initialize column def
|
1346
|
+
this._deserializeColumn(index, jsonObj); // Set leftPinned and other properties
|
1318
1347
|
|
1319
1348
|
this._onColumnCountChanged();
|
1320
|
-
this.
|
1321
|
-
this._syncLayoutToColumns(index, index + 1);
|
1349
|
+
this._syncLayoutToColumns(index, index + 1); // _updateScrollbarWidth should be called
|
1322
1350
|
|
1323
1351
|
this._dispatchColumnAddedEvent(index, 1, (index < prevCount), jsonObj);
|
1324
1352
|
};
|
@@ -1353,9 +1381,6 @@ Core.prototype.insertColumns = function (at, cols) {
|
|
1353
1381
|
}
|
1354
1382
|
if (count <= 0) { return; }
|
1355
1383
|
|
1356
|
-
var leftPinnedCount = this._countPinnedLeftColumns();
|
1357
|
-
var rightPinnedCount = this._countPinnedRightColumns();
|
1358
|
-
|
1359
1384
|
var prevState = this.freezeLayout();
|
1360
1385
|
var args = [at, 0].concat(new Array(count));
|
1361
1386
|
Array.prototype.splice.apply(this._columnDefs, args);
|
@@ -1371,21 +1396,9 @@ Core.prototype.insertColumns = function (at, cols) {
|
|
1371
1396
|
this._deserializeColumn(index, colDef);
|
1372
1397
|
}
|
1373
1398
|
|
1374
|
-
if (prevCount > 0) {
|
1375
|
-
if (at < leftPinnedCount) {
|
1376
|
-
// insert into left frozen zone
|
1377
|
-
this.freezeColumn(leftPinnedCount + count - 1, rightPinnedCount);
|
1378
|
-
} else if (at > (prevCount - rightPinnedCount)) {
|
1379
|
-
// insert into right frozen zone
|
1380
|
-
this.freezeColumn(leftPinnedCount - 1, rightPinnedCount + count);
|
1381
|
-
}
|
1382
|
-
} else if (leftPinnedCount + this._pinnedRightColumnCount < count) {
|
1383
|
-
this.freezeColumn(leftPinnedCount - 1, this._pinnedRightColumnCount);
|
1384
|
-
}
|
1385
|
-
|
1386
1399
|
this._dispatchColumnAddedEvent(at, count, (at < prevCount), colDefs);
|
1387
1400
|
|
1388
|
-
this.freezeLayout(prevState); // call _syncLayoutToColumns internally
|
1401
|
+
this.freezeLayout(prevState); // call _onColumnCountChanged and _syncLayoutToColumns internally
|
1389
1402
|
};
|
1390
1403
|
|
1391
1404
|
/** @public
|
@@ -1410,21 +1423,19 @@ Core.prototype.removeColumnAt = function (index) {
|
|
1410
1423
|
this._settings[i].getSection().removeColumnAt(index);
|
1411
1424
|
}
|
1412
1425
|
|
1413
|
-
var leftPinnedCount = this.
|
1414
|
-
var rightPinnedCount = this.
|
1426
|
+
var leftPinnedCount = this._pinnedLeftColumnCount;
|
1427
|
+
var rightPinnedCount = this._pinnedRightColumnCount;
|
1415
1428
|
|
1416
1429
|
var colDef = this._columnDefs.splice(index, 1)[0]; // width and styles
|
1417
1430
|
|
1431
|
+
this._onColumnCountChanged();
|
1432
|
+
// TODO: Column count changed may cause scroll pane to changed, and thus _updateScrollbarWidth should be included in the event handler
|
1418
1433
|
if (index < leftPinnedCount) {
|
1419
|
-
|
1420
|
-
this.freezeColumn(leftPinnedCount - 2, rightPinnedCount);
|
1434
|
+
this._updateScrollbarWidth(true, true);
|
1421
1435
|
} else if (index >= (colCount - rightPinnedCount)) {
|
1422
|
-
|
1423
|
-
this.freezeColumn(leftPinnedCount - 1, rightPinnedCount - 1);
|
1436
|
+
this._updateScrollbarWidth(true, true);
|
1424
1437
|
}
|
1425
|
-
|
1426
|
-
this._onColumnCountChanged();
|
1427
|
-
this._syncLayoutToColumns(index, colCount - 1, true); // TODO: There should be no change in column layout
|
1438
|
+
this._syncLayoutToColumns(index, colCount - 1, true); // WARNiNG: _updateScrollbarWidth may be called again here
|
1428
1439
|
|
1429
1440
|
if(!colDef) {
|
1430
1441
|
colDef = {};
|
@@ -1455,7 +1466,7 @@ Core.prototype.removeColumnAt = function (index) {
|
|
1455
1466
|
*/
|
1456
1467
|
Core.prototype.removeAllColumns = function () {
|
1457
1468
|
if (this.getColumnCount() > 0) {
|
1458
|
-
this.
|
1469
|
+
this._pinnedLeftColumnCount = 0;
|
1459
1470
|
this._pinnedRightColumnCount = 0;
|
1460
1471
|
this.setColumnCount(0);
|
1461
1472
|
}
|
@@ -1539,39 +1550,42 @@ Core.prototype.moveColumn = function (fromCol, destCol) {
|
|
1539
1550
|
}
|
1540
1551
|
|
1541
1552
|
var colDef = this._columnDefs[fromCol];
|
1553
|
+
var leftPinnedCount = this._countPinnedLeftColumns();
|
1542
1554
|
var rightPinnedCount = this._countPinnedRightColumns();
|
1543
1555
|
// var minColumn = (fromCol < destCol) ? fromCol : destCol;
|
1544
1556
|
Util.moveArrayItem(this._columnDefs, fromCol, destCol);
|
1545
1557
|
|
1546
|
-
if(
|
1547
|
-
|
1548
|
-
|
1549
|
-
if(destCol >= (colCount - rightPinnedCount)) {
|
1550
|
-
// moved into right frozen zone
|
1551
|
-
this.freezeColumn(this._startHScrollbarIndex - 2, rightPinnedCount + 1);
|
1552
|
-
} else if(destCol >= this._startHScrollbarIndex) {
|
1553
|
-
// moved out
|
1554
|
-
this.freezeColumn(this._startHScrollbarIndex - 2, rightPinnedCount);
|
1555
|
-
}
|
1556
|
-
} else if(colDef.rightPinned) {
|
1557
|
-
// Right pinned column
|
1558
|
+
if(this._hScrollbarEnabled) {
|
1559
|
+
if(fromCol < leftPinnedCount) {
|
1560
|
+
// Left pinned column
|
1558
1561
|
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1562
|
+
if(destCol >= (colCount - rightPinnedCount)) {
|
1563
|
+
// moved into right frozen zone
|
1564
|
+
this.freezeColumn(leftPinnedCount - 2, rightPinnedCount + 1);
|
1565
|
+
} else if(destCol >= leftPinnedCount) {
|
1566
|
+
// moved out
|
1567
|
+
this.freezeColumn(leftPinnedCount - 2, rightPinnedCount);
|
1568
|
+
}
|
1569
|
+
} else if(colDef["rightPinned"]) {
|
1570
|
+
// Right pinned column
|
1571
|
+
|
1572
|
+
if(destCol < leftPinnedCount) {
|
1573
|
+
// moved into left frozen zone
|
1574
|
+
this.freezeColumn(leftPinnedCount, rightPinnedCount - 1);
|
1575
|
+
} else if(destCol < (colCount - rightPinnedCount)) {
|
1576
|
+
// moved out
|
1577
|
+
this.freezeColumn(leftPinnedCount - 1, rightPinnedCount - 1);
|
1578
|
+
}
|
1579
|
+
} else {
|
1580
|
+
// unpinned column
|
1581
|
+
|
1582
|
+
if(destCol < leftPinnedCount) {
|
1583
|
+
// moved into left frozen zone
|
1584
|
+
this.freezeColumn(leftPinnedCount, rightPinnedCount);
|
1585
|
+
} else if(destCol >= (colCount - rightPinnedCount)) {
|
1586
|
+
// moved into right frozen zone
|
1587
|
+
this.freezeColumn(leftPinnedCount - 1, rightPinnedCount + 1);
|
1588
|
+
}
|
1575
1589
|
}
|
1576
1590
|
}
|
1577
1591
|
|
@@ -1647,12 +1661,20 @@ Core.prototype._deserializeColumn = function (index, jsonObj) {
|
|
1647
1661
|
var colDef = this._getColumnDef(index);
|
1648
1662
|
var value = jsonObj["dataColumnName"];
|
1649
1663
|
if (value != null) {
|
1650
|
-
colDef["dataColumnName"] =
|
1664
|
+
colDef["dataColumnName"] = value;
|
1651
1665
|
}
|
1652
1666
|
|
1653
1667
|
value = jsonObj["stationary"];
|
1654
1668
|
if (value != null) {
|
1655
|
-
colDef["stationary"] = value;
|
1669
|
+
colDef["stationary"] = value ? true : false;
|
1670
|
+
}
|
1671
|
+
value = jsonObj["leftPinned"];
|
1672
|
+
if (value != null) {
|
1673
|
+
colDef["leftPinned"] = value ? true : false;
|
1674
|
+
}
|
1675
|
+
value = jsonObj["rightPinned"];
|
1676
|
+
if (value != null) {
|
1677
|
+
colDef["rightPinned"] = value ? true : false;
|
1656
1678
|
}
|
1657
1679
|
|
1658
1680
|
this.setColumnRenderingHandler(index, jsonObj["renderingHandler"]);
|
@@ -2009,7 +2031,7 @@ Core.prototype.getColumnAlignment = function(colIndex) {
|
|
2009
2031
|
*/
|
2010
2032
|
Core.prototype.getColumnLeft = function (colIndex) {
|
2011
2033
|
var colDef = this._columnDefs[colIndex];
|
2012
|
-
if(colDef && colDef
|
2034
|
+
if(colDef && colDef["rightPinned"]) {
|
2013
2035
|
var gridWidth = this.getElement().clientWidth;
|
2014
2036
|
var contentWidth = this._layoutX.getTrackSize();
|
2015
2037
|
var colLeft = contentWidth < gridWidth ? contentWidth : gridWidth;
|
@@ -2018,7 +2040,7 @@ Core.prototype.getColumnLeft = function (colIndex) {
|
|
2018
2040
|
colLeft -= this._layoutX.getLaneSize(i);
|
2019
2041
|
}
|
2020
2042
|
return colLeft;
|
2021
|
-
} else if (this.
|
2043
|
+
} else if (this._hScrollbarEnabled && colIndex >= this._pinnedLeftColumnCount) {
|
2022
2044
|
return this._layoutX.getLaneStart(colIndex) - this._hscrollbar.getScrollLeft();
|
2023
2045
|
} else {
|
2024
2046
|
return this._layoutX.getLaneStart(colIndex);
|
@@ -2083,7 +2105,7 @@ Core.prototype._calculateColumnWidths = function (indices, widths) {
|
|
2083
2105
|
|
2084
2106
|
if (scalableCount < 1 || excess > 0) {
|
2085
2107
|
layoutX.resetLaneToDefaultSize();
|
2086
|
-
layoutX.setTrackSize(gridSize
|
2108
|
+
layoutX.setTrackSize(gridSize - this._reservedSpace);
|
2087
2109
|
fixedSize = 0;
|
2088
2110
|
for(i = 0; i < colCount; i++) {
|
2089
2111
|
if (settingCols[i]) { continue; }
|
@@ -2592,64 +2614,73 @@ Core.prototype.getFooterCount = function () {
|
|
2592
2614
|
* core.freezeColumn(0, 2); // Grid's horizontal scrollbar will affect only the middle part
|
2593
2615
|
*/
|
2594
2616
|
Core.prototype.freezeColumn = function (frozenColIndex, numRightColumn) {
|
2617
|
+
var i, colDef;
|
2618
|
+
var colCount = this.getColumnCount();
|
2619
|
+
var leftPinnedCount = 0;
|
2620
|
+
var rightPinnedCount = 0;
|
2595
2621
|
if (frozenColIndex || frozenColIndex === 0) {
|
2596
|
-
this.
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
this,
|
2604
|
-
this._getAllSections(),
|
2605
|
-
this.getColumnCount(),
|
2606
|
-
this._countPinnedRightColumns()
|
2607
|
-
);
|
2622
|
+
this._hScrollbarEnabled = true;
|
2623
|
+
leftPinnedCount = (frozenColIndex >= 0) ? frozenColIndex + 1 : 0;
|
2624
|
+
this._pinnedLeftColumnCount = leftPinnedCount; // This variable is used for caching
|
2625
|
+
|
2626
|
+
for (i = 0; i < colCount; ++i) {
|
2627
|
+
colDef = this._getColumnDef(i);
|
2628
|
+
colDef["leftPinned"] = (--leftPinnedCount >= 0);
|
2608
2629
|
}
|
2630
|
+
} else {
|
2631
|
+
this._hScrollbarEnabled = false;
|
2609
2632
|
}
|
2610
2633
|
if(numRightColumn != null) {
|
2611
|
-
|
2634
|
+
rightPinnedCount = numRightColumn > 0 ? numRightColumn : 0;
|
2635
|
+
this._pinnedRightColumnCount = rightPinnedCount; // This variable is used for caching
|
2636
|
+
|
2637
|
+
for (i = colCount; --i >= 0;) {
|
2638
|
+
colDef = this._getColumnDef(i);
|
2639
|
+
colDef["rightPinned"] = (--rightPinnedCount >= 0);
|
2640
|
+
}
|
2612
2641
|
}
|
2613
2642
|
|
2614
2643
|
this._onColumnCountChanged(); // Activate horizontal scrollbar and column virtualization
|
2615
2644
|
this._updateScrollbarWidth(true, true);
|
2616
2645
|
};
|
2617
|
-
/** @private
|
2618
|
-
* @param {number} numRightColumn Number of columns on the right side to be fixed/pinned on the right side
|
2619
|
-
*/
|
2620
|
-
Core.prototype._pinRightColumns = function (numRightColumn) {
|
2621
|
-
this._pinnedRightColumnCount = numRightColumn;
|
2622
|
-
var len = this.getColumnCount();
|
2623
|
-
for (var i = len; --i >= 0;) {
|
2624
|
-
var colDef = this._getColumnDef(i);
|
2625
|
-
if(--numRightColumn >= 0) {
|
2626
|
-
colDef.rightPinned = true;
|
2627
|
-
} else if(colDef.rightPinned) {
|
2628
|
-
colDef.rightPinned = false;
|
2629
|
-
}
|
2630
|
-
}
|
2631
|
-
};
|
2632
2646
|
|
2633
2647
|
/** @private
|
2634
|
-
* @return {number}
|
2648
|
+
* @return {number} Array of number of left pinned column count and right pinned column count
|
2635
2649
|
*/
|
2636
2650
|
Core.prototype._countPinnedLeftColumns = function () {
|
2637
|
-
|
2651
|
+
var leftPinnedCount = 0;
|
2652
|
+
if(this._hScrollbarEnabled) {
|
2653
|
+
for (var i = this._columnDefs.length; --i >= 0;) {
|
2654
|
+
var colDef = this._columnDefs[i];
|
2655
|
+
if(colDef) {
|
2656
|
+
if(colDef["leftPinned"]) {
|
2657
|
+
leftPinnedCount = i + 1; // Use the first right most pinned column
|
2658
|
+
break;
|
2659
|
+
}
|
2660
|
+
}
|
2661
|
+
}
|
2662
|
+
}
|
2663
|
+
this._pinnedLeftColumnCount = leftPinnedCount; // This variable is used as a cache
|
2664
|
+
return leftPinnedCount;
|
2638
2665
|
};
|
2639
2666
|
/** @private
|
2640
2667
|
* @return {number} numRightColumn Number of columns on the right side to be fixed/pinned on the right side
|
2641
2668
|
*/
|
2642
2669
|
Core.prototype._countPinnedRightColumns = function () {
|
2643
|
-
var
|
2644
|
-
|
2645
|
-
var
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
|
2670
|
+
var rightPinnedCount = 0;
|
2671
|
+
if(this._hScrollbarEnabled) {
|
2672
|
+
var colCount = this._columnDefs.length;
|
2673
|
+
var i;
|
2674
|
+
for(i = 0; i < colCount; ++i) {
|
2675
|
+
var colDef = this._columnDefs[i];
|
2676
|
+
if(colDef && colDef["rightPinned"]) {
|
2677
|
+
break;
|
2678
|
+
}
|
2650
2679
|
}
|
2680
|
+
rightPinnedCount = colCount - i;
|
2651
2681
|
}
|
2652
|
-
|
2682
|
+
this._pinnedRightColumnCount = rightPinnedCount;
|
2683
|
+
return rightPinnedCount;
|
2653
2684
|
};
|
2654
2685
|
|
2655
2686
|
/** @public
|
@@ -2664,13 +2695,7 @@ Core.prototype.isPinnedColumn = function (colIndex) {
|
|
2664
2695
|
* @return {number}
|
2665
2696
|
*/
|
2666
2697
|
Core.prototype.getFrozenColumnCount = function() {
|
2667
|
-
|
2668
|
-
//Count maybe < 0 in the cass that null is passed to core.freezeColumn(null);
|
2669
|
-
//which indicates that the HScrollbar is disabled
|
2670
|
-
if (count < 0) {
|
2671
|
-
count = 0;
|
2672
|
-
}
|
2673
|
-
return count;
|
2698
|
+
return this._hScrollbarEnabled ? this._pinnedLeftColumnCount : 0;
|
2674
2699
|
};
|
2675
2700
|
/** Returns number of pinned left columns. This is an alias to getFrozenColumnCount
|
2676
2701
|
* @public
|
@@ -3102,7 +3127,7 @@ Core.prototype.getVScrollStartIndex = function () {
|
|
3102
3127
|
* @return {number}
|
3103
3128
|
*/
|
3104
3129
|
Core.prototype.getHScrollStartIndex = function () {
|
3105
|
-
return this.
|
3130
|
+
return this._hScrollbarEnabled ? this._pinnedLeftColumnCount : -1;
|
3106
3131
|
};
|
3107
3132
|
/** @public
|
3108
3133
|
* @param {number} colIndex
|
@@ -3124,7 +3149,7 @@ Core.prototype.scrollToColumn = function (colIndex, leftOfView) {
|
|
3124
3149
|
return false;
|
3125
3150
|
}
|
3126
3151
|
|
3127
|
-
var widthOffset = this.
|
3152
|
+
var widthOffset = this._hScrollbarEnabled ? this._layoutX.getLaneStart(this._pinnedLeftColumnCount) : 0;
|
3128
3153
|
var scrollLeft = this._hscrollbar.getScrollLeft();
|
3129
3154
|
var viewLeft = scrollLeft + widthOffset;
|
3130
3155
|
var viewWidth = this._hscrollbar.getWidth();
|
@@ -3448,6 +3473,13 @@ Core.prototype.requestRowRefresh = function() {
|
|
3448
3473
|
this._rowRefreshTimer = setTimeout(this._onRowRefresh, 100);
|
3449
3474
|
}
|
3450
3475
|
};
|
3476
|
+
/** Set a timer to call updateScrollbarHeight only once to avoid performance issue due to multiple call of _updateScrollbarHeight()
|
3477
|
+
* @public
|
3478
|
+
*/
|
3479
|
+
Core.prototype._requestScrollbarUpdate = function() {
|
3480
|
+
this._updateScrollbarHeight(true, true);
|
3481
|
+
this._rowHeightTimerId = 0;
|
3482
|
+
};
|
3451
3483
|
|
3452
3484
|
/** prevent bind data process
|
3453
3485
|
* @public
|
@@ -3604,7 +3636,7 @@ Core.prototype.getHiddenInput = function () {
|
|
3604
3636
|
* @see {@link http://help.dottoro.com/ljqmdirr.php}
|
3605
3637
|
*/
|
3606
3638
|
Core.prototype.focus = function () {
|
3607
|
-
var elem = this.
|
3639
|
+
var elem = this._hiddenInput;
|
3608
3640
|
var activeElem = document.activeElement;
|
3609
3641
|
if(elem && elem !== activeElem) {
|
3610
3642
|
var x = window.pageXOffset;
|
@@ -3728,10 +3760,221 @@ Core._defaultDataBinding = function(e) {
|
|
3728
3760
|
e.cell.setContent(e.dataValue);
|
3729
3761
|
};
|
3730
3762
|
|
3763
|
+
/** @public
|
3764
|
+
* @param {number} colIndex
|
3765
|
+
* @param {boolean=} selected
|
3766
|
+
*/
|
3767
|
+
Core.prototype.selectColumn = function (colIndex, selected) {
|
3768
|
+
for (var i = this._settings.length; --i >= 0; ) {
|
3769
|
+
this._settings[i].getSection().selectColumn(colIndex, selected);
|
3770
|
+
}
|
3771
|
+
this._updateColumnBounds();
|
3772
|
+
};
|
3773
|
+
/** @public
|
3774
|
+
* @param {number} colIndex
|
3775
|
+
* @return {boolean}
|
3776
|
+
*/
|
3777
|
+
Core.prototype.isSelectedColumn = function (colIndex) {
|
3778
|
+
var first = this._settings[0] || null;
|
3779
|
+
if(first) {
|
3780
|
+
return first.getSection().isSelectedColumn(colIndex);
|
3781
|
+
}
|
3782
|
+
return false;
|
3783
|
+
};
|
3784
|
+
|
3785
|
+
/** @private
|
3786
|
+
*/
|
3787
|
+
Core.prototype._updateColumnBounds = function () {
|
3788
|
+
if(this._columnBoundConflator.conflate()) {
|
3789
|
+
return;
|
3790
|
+
}
|
3791
|
+
|
3792
|
+
var len = this.getColumnCount();
|
3793
|
+
var lftIdx = -1;
|
3794
|
+
var rgtIdx = -1;
|
3795
|
+
var i;
|
3796
|
+
for(i = 0; i < len; ++i) {
|
3797
|
+
if(this.isSelectedColumn(i)) {
|
3798
|
+
rgtIdx = i;
|
3799
|
+
if(lftIdx < 0) {
|
3800
|
+
lftIdx = i;
|
3801
|
+
}
|
3802
|
+
}
|
3803
|
+
}
|
3804
|
+
var sectCount = this._settings.length;
|
3805
|
+
if(sectCount) {
|
3806
|
+
var section = this._settings[0].getSection();
|
3807
|
+
var positions = [0, 0];
|
3808
|
+
var noBorders = [false, false];
|
3809
|
+
section.calculateColumnBounds(lftIdx, rgtIdx, positions, noBorders);
|
3810
|
+
|
3811
|
+
for (i = sectCount; --i >= 0; ) {
|
3812
|
+
section = this._settings[i].getSection();
|
3813
|
+
section.updateColumnBounds(positions, noBorders);
|
3814
|
+
}
|
3815
|
+
}
|
3816
|
+
};
|
3817
|
+
|
3818
|
+
/** @public
|
3819
|
+
* @param {number} startColIndex INCLUSIVE
|
3820
|
+
* @param {number} endColIndex INCLUSIVE
|
3821
|
+
* @return {Object}
|
3822
|
+
*/
|
3823
|
+
Core.prototype.getColumnRect = function (startColIndex, endColIndex) {
|
3824
|
+
var gridWidth = this.getElement().clientWidth;
|
3825
|
+
var scrollViewSize = gridWidth;
|
3826
|
+
var hscrollbar = this._hscrollbar;
|
3827
|
+
if (hscrollbar.isActive()) {
|
3828
|
+
scrollViewSize = hscrollbar.getTrackSize();
|
3829
|
+
}
|
3830
|
+
|
3831
|
+
var left = 0;
|
3832
|
+
var width = 0;
|
3833
|
+
if (this._settings.length) {
|
3834
|
+
var section = this._settings[0].getSection();
|
3835
|
+
var positions = [0, 0];
|
3836
|
+
section.calculateColumnBounds(startColIndex, endColIndex, positions, []);
|
3837
|
+
left = positions[0];
|
3838
|
+
width = positions[1] - left;
|
3839
|
+
}
|
3840
|
+
var rect = {
|
3841
|
+
top: 0, // TODO: Support column grouping
|
3842
|
+
left: left,
|
3843
|
+
width: width,
|
3844
|
+
height: this._layoutY.getTrackSize(),
|
3845
|
+
leftPinnedIndex: this._pinnedLeftColumnCount - 1,
|
3846
|
+
rightPinnedIndex: this.getFirstPinnedRightIndex(),
|
3847
|
+
scrollViewSize: scrollViewSize,
|
3848
|
+
gridWidth: gridWidth
|
3849
|
+
};
|
3850
|
+
return rect;
|
3851
|
+
};
|
3852
|
+
|
3853
|
+
/** @public
|
3854
|
+
* @param {number} startRowIndex INCLUSIVE
|
3855
|
+
* @param {number} endRowIndex INCLUSIVE
|
3856
|
+
* @return {Object}
|
3857
|
+
*/
|
3858
|
+
Core.prototype.getRowRect = function (startRowIndex, endRowIndex) {
|
3859
|
+
var contentWidth = this._layoutX.getTrackSize();
|
3860
|
+
var gridElem = this.getElement();
|
3861
|
+
var gridWidth = gridElem.clientWidth;
|
3862
|
+
contentWidth = contentWidth < gridWidth ? contentWidth : gridWidth;
|
3863
|
+
|
3864
|
+
var section = this.getSection("content");
|
3865
|
+
var rowOffset = section ? section.getRowOffset() : 1;
|
3866
|
+
var layoutY = this._layoutY;
|
3867
|
+
var sectionOffsetPx = layoutY.getLaneStart(rowOffset);
|
3868
|
+
|
3869
|
+
var scrollTop = 0;
|
3870
|
+
var scrollViewSize = section.getHeight();
|
3871
|
+
var vscrollbar = this._vscrollbar;
|
3872
|
+
if (vscrollbar.isActive()) {
|
3873
|
+
scrollTop = vscrollbar.getScrollTop();
|
3874
|
+
scrollViewSize = vscrollbar.getTrackSize();
|
3875
|
+
}
|
3876
|
+
var scrollViewBottom = scrollViewSize + sectionOffsetPx;
|
3877
|
+
|
3878
|
+
var topPx = layoutY.getLaneStart(startRowIndex + rowOffset) - scrollTop;
|
3879
|
+
var bottomPx = layoutY.getLaneEnd(endRowIndex + rowOffset) - scrollTop;
|
3880
|
+
if (topPx < sectionOffsetPx) {
|
3881
|
+
topPx = sectionOffsetPx;
|
3882
|
+
} else if (topPx > scrollViewBottom) {
|
3883
|
+
topPx = scrollViewBottom;
|
3884
|
+
}
|
3885
|
+
if (bottomPx < sectionOffsetPx) {
|
3886
|
+
bottomPx = sectionOffsetPx;
|
3887
|
+
} else if (bottomPx > scrollViewBottom) {
|
3888
|
+
bottomPx = scrollViewBottom;
|
3889
|
+
}
|
3890
|
+
|
3891
|
+
// Change origin point from grid to section
|
3892
|
+
topPx -= sectionOffsetPx;
|
3893
|
+
bottomPx -= sectionOffsetPx;
|
3894
|
+
|
3895
|
+
var rect = {
|
3896
|
+
top: topPx,
|
3897
|
+
left: 0,
|
3898
|
+
width: contentWidth,
|
3899
|
+
height: bottomPx - topPx,
|
3900
|
+
scrollViewSize: scrollViewSize,
|
3901
|
+
scrollViewTop: sectionOffsetPx,
|
3902
|
+
scrollViewBottom: scrollViewBottom
|
3903
|
+
};
|
3904
|
+
return rect;
|
3905
|
+
};
|
3906
|
+
/** @public
|
3907
|
+
* @param {Object} configObj
|
3908
|
+
* @return {!Object}
|
3909
|
+
*/
|
3910
|
+
Core.prototype.normalizeConfig = function (configObj) {
|
3911
|
+
if(!configObj) {
|
3912
|
+
configObj = {};
|
3913
|
+
}
|
3914
|
+
var columns = configObj["columns"];
|
3915
|
+
var colCount = columns ? columns.length : 0;
|
3916
|
+
var i, column;
|
3917
|
+
|
3918
|
+
var freezingIndex = configObj["columnFreezing"];
|
3919
|
+
if(freezingIndex == null) {
|
3920
|
+
freezingIndex = configObj["freezeColumn"];
|
3921
|
+
}
|
3922
|
+
var pinnedRightColumns = configObj["pinnedRightColumns"] || configObj["frozenRightColumns"];
|
3923
|
+
if (pinnedRightColumns) {
|
3924
|
+
delete configObj["pinnedRightColumns"];
|
3925
|
+
delete configObj["frozenRightColumns"];
|
3926
|
+
|
3927
|
+
configObj["columnVirtualRendering"] = false;
|
3928
|
+
configObj["columnVirtualization"] = false;
|
3929
|
+
|
3930
|
+
for(i = colCount; --i >= 0;) {
|
3931
|
+
if(--pinnedRightColumns >= 0) {
|
3932
|
+
column = columns[i];
|
3933
|
+
if(column) {
|
3934
|
+
column["rightPinned"] = true;
|
3935
|
+
}
|
3936
|
+
}
|
3937
|
+
}
|
3938
|
+
}
|
3939
|
+
if(freezingIndex != null) {
|
3940
|
+
delete configObj["columnFreezing"];
|
3941
|
+
delete configObj["freezeColumn"];
|
3942
|
+
|
3943
|
+
if(freezingIndex >= 0) {
|
3944
|
+
if(columns) {
|
3945
|
+
column = columns[freezingIndex];
|
3946
|
+
if(column) {
|
3947
|
+
column["leftPinned"] = true;
|
3948
|
+
}
|
3949
|
+
}
|
3950
|
+
}
|
3951
|
+
}
|
3952
|
+
|
3953
|
+
return configObj;
|
3954
|
+
};
|
3731
3955
|
//#endregion Public Methods
|
3732
3956
|
|
3733
3957
|
//#region Private Methods
|
3734
3958
|
/** @private
|
3959
|
+
*/
|
3960
|
+
Core.prototype._dispatchColumnPositionChanged = function () {
|
3961
|
+
if(this._columnPositionConflator.conflate()) {
|
3962
|
+
return;
|
3963
|
+
}
|
3964
|
+
|
3965
|
+
this._dispatch("columnPositionChanged", { sender: this });
|
3966
|
+
};
|
3967
|
+
|
3968
|
+
/** @private
|
3969
|
+
*/
|
3970
|
+
Core.prototype._dispatchRowPositionChanged = function () {
|
3971
|
+
if(this._rowPositionConflator.conflate()) {
|
3972
|
+
return;
|
3973
|
+
}
|
3974
|
+
|
3975
|
+
this._dispatch("rowPositionChanged", { sender: this });
|
3976
|
+
};
|
3977
|
+
/** @private
|
3735
3978
|
* @return {!Array.<ILayoutGrid>}
|
3736
3979
|
*/
|
3737
3980
|
Core.prototype._getAllSections = function () {
|
@@ -3799,7 +4042,10 @@ Core.prototype._newSection = function (opt_type, sectionName) {
|
|
3799
4042
|
}
|
3800
4043
|
|
3801
4044
|
opt_type = this._toSectionType(opt_type);
|
3802
|
-
var
|
4045
|
+
var sectionOpt = {
|
4046
|
+
"horizontalScrollbar": this._hscrollbar
|
4047
|
+
};
|
4048
|
+
var section = (opt_type === "content") ? new VirtualizedLayoutGrid(sectionOpt) : new LayoutGrid(sectionOpt);
|
3803
4049
|
section._setContext(this);
|
3804
4050
|
|
3805
4051
|
var sectionSettings = new SectionSettings(section);
|
@@ -3826,9 +4072,6 @@ Core.prototype._newSection = function (opt_type, sectionName) {
|
|
3826
4072
|
section.listen("rowCountChanged", this._onRowCountChanged);
|
3827
4073
|
section.listen("rowHeightChanged", this._onRowHeightChanged);
|
3828
4074
|
|
3829
|
-
if (this._autoSetDataSource) {
|
3830
|
-
sectionSettings.setDataSource(this._dataSource);
|
3831
|
-
}
|
3832
4075
|
return sectionSettings;
|
3833
4076
|
};
|
3834
4077
|
|
@@ -4119,7 +4362,12 @@ Core.prototype._removeColumn = function (num) { // TODO: change the logic to us
|
|
4119
4362
|
*/
|
4120
4363
|
Core.prototype._onSectionDataChanged = function (e) {
|
4121
4364
|
if(this._dispatchingDataChanged) { return; } // Prevent infinite loop
|
4122
|
-
|
4365
|
+
|
4366
|
+
var colCount = this._layoutX.getLaneCount();
|
4367
|
+
this._dispatchingDataChanged = colCount ? true : false;
|
4368
|
+
if(!colCount) {
|
4369
|
+
return;
|
4370
|
+
}
|
4123
4371
|
|
4124
4372
|
var fromR = /** @type{number} */(e["fromRowIndex"]);
|
4125
4373
|
var toR = /** @type{number} */(e["toRowIndex"]);
|
@@ -4127,6 +4375,9 @@ Core.prototype._onSectionDataChanged = function (e) {
|
|
4127
4375
|
var dataView = /** @type{DataView} */(e["dataSource"]);
|
4128
4376
|
var hasDataView = (dataView && dataView.getDataSource()) ? 1 : 0;
|
4129
4377
|
var rids, rowDataCollection;
|
4378
|
+
|
4379
|
+
section._startBindingSession(true);
|
4380
|
+
|
4130
4381
|
if(hasDataView) {
|
4131
4382
|
rids = dataView.getVisibleRowIds(true);
|
4132
4383
|
rowDataCollection = dataView.getMultipleRowData(rids, fromR, toR);
|
@@ -4134,7 +4385,6 @@ Core.prototype._onSectionDataChanged = function (e) {
|
|
4134
4385
|
}
|
4135
4386
|
this._dispatch("preSectionDataBinding", e);
|
4136
4387
|
|
4137
|
-
var colCount = this._layoutX.getLaneCount();
|
4138
4388
|
var dataMap = this.getDataColumnMap();
|
4139
4389
|
for (var c = 0; c < colCount; ++c) {
|
4140
4390
|
if(section["isColumnActive"](c) && (this.isColumnVisible(c) || this._isAlwaysRenderColumn(c))) {
|
@@ -4165,8 +4415,9 @@ Core.prototype._onSectionDataChanged = function (e) {
|
|
4165
4415
|
}
|
4166
4416
|
|
4167
4417
|
this._dispatch("postSectionDataBinding", e);
|
4168
|
-
|
4169
4418
|
this._dispatchRowExpansionBinding(e);
|
4419
|
+
|
4420
|
+
section._startBindingSession(false);
|
4170
4421
|
this._dispatchingDataChanged = false;
|
4171
4422
|
};
|
4172
4423
|
|
@@ -4186,12 +4437,16 @@ Core.prototype._updateScrollbar = function (scrollbar) {
|
|
4186
4437
|
*/
|
4187
4438
|
Core.prototype._onVScroll = function (e) {
|
4188
4439
|
this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop()); // Trigger virtualization event
|
4440
|
+
this._dispatchRowPositionChanged();
|
4189
4441
|
};
|
4190
4442
|
/** @private
|
4191
4443
|
* @param {Object} e
|
4192
4444
|
*/
|
4193
4445
|
Core.prototype._onHScroll = function (e) {
|
4194
|
-
this.
|
4446
|
+
var scrollVal = this._hscrollbar.getScrollLeft();
|
4447
|
+
this._colVirtualizer.setViewOffset(scrollVal); // Trigger virtualization event
|
4448
|
+
this._updateColumnBounds();
|
4449
|
+
this._dispatchColumnPositionChanged();
|
4195
4450
|
};
|
4196
4451
|
/** @private
|
4197
4452
|
*/
|
@@ -4236,6 +4491,9 @@ Core.prototype._onRowInViewChanged = function (e) { // Triggered from virtualize
|
|
4236
4491
|
* @param {Object} e
|
4237
4492
|
*/
|
4238
4493
|
Core.prototype._onColInViewChanged = function (e) {
|
4494
|
+
if(!this.getColumnCount()) {
|
4495
|
+
return; // No column for activation and no cell to be rendered
|
4496
|
+
}
|
4239
4497
|
var pfi = e["prevFirstIndex"];
|
4240
4498
|
var pli = e["prevLastIndex"]; // INCLUSIVE
|
4241
4499
|
var fi = e["firstIndex"];
|
@@ -4298,7 +4556,7 @@ Core.prototype._getColActivationList = function (fi, li, first, last) {
|
|
4298
4556
|
li = this._colVirtualizer.getLastIndexInView();
|
4299
4557
|
}
|
4300
4558
|
|
4301
|
-
var leftPinnedIndex = this.
|
4559
|
+
var leftPinnedIndex = this.getHScrollStartIndex();
|
4302
4560
|
var rightPinnedIndex = this.getFirstPinnedRightIndex();
|
4303
4561
|
var activations = new Array(last + 1);
|
4304
4562
|
for (var c = first; c <= last; ++c) {
|
@@ -4485,9 +4743,17 @@ Core.prototype._onRowHeightChanged = function (e) {
|
|
4485
4743
|
this._rowHeightConflator._needScrollbarUpdate = false;
|
4486
4744
|
this._updateScrollbarHeight(true, true);
|
4487
4745
|
} else if(minSectionIndex >= 0) {
|
4488
|
-
|
4489
|
-
|
4746
|
+
if(this._dispatchingDataChanged){
|
4747
|
+
if(!this._rowHeightTimerId){
|
4748
|
+
this._rowHeightTimerId = setTimeout(this._requestScrollbarUpdate, 0);
|
4749
|
+
}
|
4750
|
+
} else {
|
4751
|
+
this._updateScrollbarHeight(minSectionIndex < this._startVScrollbarIndex,
|
4752
|
+
minSectionIndex >= this._startVScrollbarIndex);
|
4753
|
+
}
|
4490
4754
|
}
|
4755
|
+
|
4756
|
+
this._dispatchRowPositionChanged();
|
4491
4757
|
};
|
4492
4758
|
/** @private
|
4493
4759
|
* @param {ILayoutGrid} s
|
@@ -4544,26 +4810,33 @@ Core.prototype._onSectionCountChanged = function (opt_suppressLayout) {
|
|
4544
4810
|
};
|
4545
4811
|
/** @private */
|
4546
4812
|
Core.prototype._onColumnCountChanged = function () {
|
4547
|
-
if(this._frozenLayout) { return; }
|
4813
|
+
if(this._frozenLayout || this._disposed) { return; }
|
4548
4814
|
|
4549
|
-
|
4815
|
+
// TODO: Optimize these methods during initialization
|
4816
|
+
var pinnedLeft = this._countPinnedLeftColumns();
|
4550
4817
|
var pinnedRight = this._countPinnedRightColumns();
|
4551
|
-
var pinnedLeft = this._startHScrollbarIndex >= 0 ? this._startHScrollbarIndex : colCount;
|
4552
4818
|
|
4553
|
-
|
4819
|
+
this._updateColumnBounds();
|
4820
|
+
|
4821
|
+
if (this._hScrollbarEnabled && pinnedLeft + pinnedRight < this.getColumnCount()) {
|
4554
4822
|
this._hscrollbar.enable();
|
4555
4823
|
this._colVirtualizer.activate();
|
4556
4824
|
|
4557
4825
|
this._hscrollbar.setScrollContent(
|
4558
4826
|
this,
|
4559
4827
|
this._getAllSections(),
|
4560
|
-
|
4828
|
+
pinnedLeft,
|
4561
4829
|
pinnedRight
|
4562
4830
|
);
|
4563
|
-
} else {
|
4831
|
+
} else { // All columns are pinned and thus no column is scrollable
|
4564
4832
|
this._hscrollbar.disable();
|
4565
4833
|
this._colVirtualizer.deactivate();
|
4834
|
+
|
4835
|
+
pinnedLeft = pinnedRight = 0;
|
4566
4836
|
}
|
4837
|
+
|
4838
|
+
this._element.classList.toggle("right-pinning", pinnedRight > 0 ? true : false);
|
4839
|
+
this._dispatchColumnPositionChanged();
|
4567
4840
|
};
|
4568
4841
|
|
4569
4842
|
/** @private
|
@@ -4705,7 +4978,7 @@ Core.prototype._updateScrollbarHeight = function (paneChanged, contentChanged, n
|
|
4705
4978
|
* @param {boolean} contentChanged
|
4706
4979
|
*/
|
4707
4980
|
Core.prototype._updateScrollbarWidth = function (paneChanged, contentChanged) {
|
4708
|
-
if (paneChanged && this.
|
4981
|
+
if (paneChanged && this._hScrollbarEnabled) {
|
4709
4982
|
// Scroll Frame
|
4710
4983
|
var gridElem = this.getElement();
|
4711
4984
|
var scrollFrame = this._hscrollbar.getParent();
|
@@ -4715,11 +4988,11 @@ Core.prototype._updateScrollbarWidth = function (paneChanged, contentChanged) {
|
|
4715
4988
|
}
|
4716
4989
|
|
4717
4990
|
// Frozen Area
|
4718
|
-
var leftFrozenArea = this._layoutX.getLaneStart(this.
|
4991
|
+
var leftFrozenArea = this._layoutX.getLaneStart(this._pinnedLeftColumnCount);
|
4719
4992
|
|
4720
4993
|
var colCount = this._layoutX.getLaneCount();
|
4721
4994
|
var rightFrozenArea = 0;
|
4722
|
-
var rightPinnedCount = this._countPinnedRightColumns();
|
4995
|
+
var rightPinnedCount = this._countPinnedRightColumns(); // TODO: Check if we need to do a recount here
|
4723
4996
|
if (rightPinnedCount) {
|
4724
4997
|
rightFrozenArea = this._layoutX.getLaneStart(colCount) -
|
4725
4998
|
this._layoutX.getLaneStart(colCount - rightPinnedCount);
|
@@ -4744,7 +5017,7 @@ Core.prototype._updateScrollbarWidth = function (paneChanged, contentChanged) {
|
|
4744
5017
|
viewSize = containerWidth;
|
4745
5018
|
}
|
4746
5019
|
this._colVirtualizer.setViewSize(viewSize / this._zoomFactor);
|
4747
|
-
this._colVirtualizer.setViewBounds(this.
|
5020
|
+
this._colVirtualizer.setViewBounds(this._pinnedLeftColumnCount, rightPinnedCount);
|
4748
5021
|
} else {
|
4749
5022
|
this._colVirtualizer.validateVirtualization(); // Content width may be changed
|
4750
5023
|
}
|
@@ -4818,8 +5091,10 @@ Core.prototype._syncLayoutToColumns = function (from, to, opt_forceDispatching)
|
|
4818
5091
|
}
|
4819
5092
|
|
4820
5093
|
// TODO: Check if "to" should be greater than or equal to first pinnied right index
|
4821
|
-
var
|
4822
|
-
this._updateScrollbarWidth(
|
5094
|
+
var paneChanged = forceUpdate || (from < this.getHScrollStartIndex()) || (to > this.getFirstPinnedRightIndex());
|
5095
|
+
this._updateScrollbarWidth(paneChanged, true /* contentChanged */);
|
5096
|
+
this._updateColumnBounds();
|
5097
|
+
this._dispatchColumnPositionChanged();
|
4823
5098
|
|
4824
5099
|
if (dirty || opt_forceDispatching) {
|
4825
5100
|
this._dispatch("widthChanged", {
|
@@ -4910,15 +5185,8 @@ Core.prototype._updateLayout = function () {
|
|
4910
5185
|
|
4911
5186
|
var sectionCount = this.getSectionCount();
|
4912
5187
|
for (var s = 0; s < sectionCount; ++s) {
|
4913
|
-
var
|
4914
|
-
|
4915
|
-
if(settings.getType() == "title") { // Currently we only need title to be updated
|
4916
|
-
section.updateLayout();
|
4917
|
-
}
|
4918
|
-
if(section.getReservedSpace()) {
|
4919
|
-
// TODO: should update right space's style inside section.updateLayout function
|
4920
|
-
section._updateRightSpaceStyle(this._hscrollbar.isActive() && !this._pinnedRightColumnCount);
|
4921
|
-
}
|
5188
|
+
var section = this._settings[s].getSection();
|
5189
|
+
section.updateLayout(); // Notify section about forced recalculation of the layout
|
4922
5190
|
}
|
4923
5191
|
};
|
4924
5192
|
|