@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.
Files changed (268) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
  2. package/lib/column-dragging/es6/ColumnDragging.js +764 -0
  3. package/lib/column-dragging/es6/index.d.ts +1 -0
  4. package/lib/column-dragging/es6/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
  6. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
  7. package/lib/column-selection-dialog/lib/column-selection-dialog.js +226 -23
  8. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
  9. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
  10. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
  11. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
  12. package/lib/core/dist/core.css +1 -1
  13. package/lib/core/dist/core.js +17835 -16266
  14. package/lib/core/dist/core.min.js +1 -1
  15. package/lib/core/es6/data/ColumnStats.d.ts +2 -2
  16. package/lib/core/es6/data/DataCache.d.ts +4 -4
  17. package/lib/core/es6/data/DataTable.d.ts +5 -5
  18. package/lib/core/es6/data/DataTable.js +33 -11
  19. package/lib/core/es6/data/DataView.d.ts +26 -17
  20. package/lib/core/es6/data/DataView.js +172 -49
  21. package/lib/core/es6/data/Segment.d.ts +2 -0
  22. package/lib/core/es6/data/Segment.js +7 -0
  23. package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
  24. package/lib/core/es6/data/WrappedView.d.ts +289 -0
  25. package/lib/core/es6/data/WrappedView.js +1319 -0
  26. package/lib/core/es6/grid/Core.d.ts +42 -27
  27. package/lib/core/es6/grid/Core.js +431 -163
  28. package/lib/core/es6/grid/ILayoutGrid.d.ts +23 -15
  29. package/lib/core/es6/grid/ILayoutGrid.js +45 -2
  30. package/lib/core/es6/grid/LayoutGrid.d.ts +10 -1
  31. package/lib/core/es6/grid/LayoutGrid.js +311 -108
  32. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +10 -1
  33. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +382 -24
  34. package/lib/core/es6/grid/components/Cell.d.ts +4 -4
  35. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
  36. package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
  37. package/lib/core/es6/grid/components/Column.d.ts +1 -1
  38. package/lib/core/es6/grid/components/Column.js +8 -2
  39. package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
  40. package/lib/core/es6/grid/components/HScrollbar.d.ts +4 -0
  41. package/lib/core/es6/grid/components/HScrollbar.js +20 -4
  42. package/lib/core/es6/grid/components/Scrollbar.d.ts +1 -1
  43. package/lib/core/es6/grid/components/StretchedCells.js +2 -2
  44. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  45. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
  46. package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
  47. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
  48. package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
  49. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
  50. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  51. package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
  52. package/lib/core/es6/grid/util/SectionSettings.js +5 -0
  53. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  54. package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
  55. package/lib/core/es6/grid/util/TrackLayout.js +29 -3
  56. package/lib/core/es6/grid/util/util.d.ts +2 -2
  57. package/lib/core/es6/index.d.ts +1 -5
  58. package/lib/core/es6/index.js +1 -7
  59. package/lib/core/es6/tr-grid-theme.js +1 -1
  60. package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
  61. package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
  62. package/lib/filter-dialog/lib/filter-dialog.js +94 -32
  63. package/lib/filter-dialog/themes/base-checkbox.less +8 -1
  64. package/lib/filter-dialog/themes/base.less +69 -1
  65. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  74. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  75. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  76. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  77. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  78. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  79. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  80. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  81. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  82. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  83. package/lib/grid/lib/efx-grid.d.ts +30 -8
  84. package/lib/grid/lib/efx-grid.js +120 -115
  85. package/lib/grid/themes/base.less +5 -3
  86. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  87. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  88. package/lib/grid/themes/halo/efx-grid.less +72 -41
  89. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  90. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  91. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  92. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  93. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  94. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  95. package/lib/index.d.ts +2 -0
  96. package/lib/index.js +2 -0
  97. package/lib/row-segmenting/es6/RowSegmenting.d.ts +8 -2
  98. package/lib/row-segmenting/es6/RowSegmenting.js +137 -21
  99. package/lib/rt-grid/dist/rt-grid.js +11017 -9193
  100. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  101. package/lib/rt-grid/es6/ColumnDefinition.d.ts +9 -4
  102. package/lib/rt-grid/es6/ColumnDefinition.js +20 -108
  103. package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
  104. package/lib/rt-grid/es6/Grid.d.ts +30 -15
  105. package/lib/rt-grid/es6/Grid.js +436 -167
  106. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  107. package/lib/rt-grid/es6/RowDefSorter.js +137 -0
  108. package/lib/rt-grid/es6/RowDefinition.d.ts +12 -7
  109. package/lib/rt-grid/es6/RowDefinition.js +58 -2
  110. package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -1
  111. package/lib/rt-grid/es6/SnapshotFiller.js +23 -0
  112. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +1 -1
  113. package/lib/tr-grid-cell-selection/es6/CellSelection.js +53 -40
  114. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +6 -3
  115. package/lib/tr-grid-checkbox/es6/Checkbox.js +79 -34
  116. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
  117. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +10 -0
  118. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +5 -1
  119. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +269 -10
  120. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
  121. package/lib/tr-grid-column-stack/es6/ColumnStack.js +243 -125
  122. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
  123. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +24 -13
  124. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +4 -2
  125. package/lib/tr-grid-filter-input/es6/FilterInput.js +73 -10
  126. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
  127. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
  128. package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
  129. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
  130. package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
  131. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
  132. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
  133. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
  134. package/lib/tr-grid-row-dragging/es6/RowDragging.js +108 -127
  135. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
  136. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +88 -33
  137. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
  138. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +138 -38
  139. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +13 -9
  140. package/lib/tr-grid-row-selection/es6/RowSelection.js +230 -29
  141. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +2 -0
  142. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +36 -0
  143. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  144. package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
  145. package/lib/tr-grid-util/es6/CellPainter.d.ts +8 -8
  146. package/lib/tr-grid-util/es6/Conflator.d.ts +2 -2
  147. package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
  148. package/lib/tr-grid-util/es6/DateTime.d.ts +4 -4
  149. package/lib/tr-grid-util/es6/Delay.d.ts +1 -1
  150. package/lib/tr-grid-util/es6/Dom.d.ts +4 -4
  151. package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
  152. package/lib/tr-grid-util/es6/DragUI.js +214 -0
  153. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
  154. package/lib/tr-grid-util/es6/ElementObserver.js +28 -1
  155. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +1 -1
  156. package/lib/tr-grid-util/es6/ElfDate.d.ts +3 -3
  157. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -4
  158. package/lib/tr-grid-util/es6/ElfUtil.js +1 -1
  159. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +1 -1
  160. package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
  161. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +1 -1
  162. package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
  163. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +5 -5
  164. package/lib/tr-grid-util/es6/GridPlugin.d.ts +3 -3
  165. package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
  166. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +1 -1
  167. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +10 -2
  168. package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
  169. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
  170. package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
  171. package/lib/tr-grid-util/es6/PercentBar.d.ts +1 -1
  172. package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
  173. package/lib/tr-grid-util/es6/Popup.d.ts +2 -2
  174. package/lib/tr-grid-util/es6/RequestQueue.d.ts +1 -1
  175. package/lib/tr-grid-util/es6/RowPainter.d.ts +3 -0
  176. package/lib/tr-grid-util/es6/RowPainter.js +120 -28
  177. package/lib/tr-grid-util/es6/SubTable.d.ts +9 -9
  178. package/lib/tr-grid-util/es6/Table.d.ts +13 -13
  179. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +3 -3
  180. package/lib/tr-grid-util/es6/TickCodes.d.ts +2 -2
  181. package/lib/tr-grid-util/es6/TouchProxy.d.ts +1 -1
  182. package/lib/tr-grid-util/es6/Util.d.ts +6 -6
  183. package/lib/tr-grid-util/es6/formula/Engine.d.ts +5 -5
  184. package/lib/tr-grid-util/es6/formula/Formula.d.ts +3 -3
  185. package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
  186. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
  187. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +2 -2
  188. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +4 -4
  189. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
  190. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
  191. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +11 -11
  192. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +7 -7
  193. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +1 -1
  194. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -1
  195. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  196. package/lib/types/es6/CellSelection.d.ts +1 -1
  197. package/lib/types/es6/Checkbox.d.ts +6 -3
  198. package/lib/types/es6/ColumnGrouping.d.ts +1 -0
  199. package/lib/types/es6/ColumnSelection.d.ts +5 -1
  200. package/lib/types/es6/ColumnStack.d.ts +8 -4
  201. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
  202. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
  203. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
  204. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
  205. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
  206. package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
  207. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  208. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
  209. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
  210. package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
  211. package/lib/types/es6/ConditionalColoring.d.ts +1 -1
  212. package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
  213. package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
  214. package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
  215. package/lib/types/es6/Core/data/DataView.d.ts +26 -17
  216. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  217. package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
  218. package/lib/types/es6/Core/data/WrappedView.d.ts +289 -0
  219. package/lib/types/es6/Core/grid/Core.d.ts +42 -27
  220. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +23 -15
  221. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +10 -1
  222. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +10 -1
  223. package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
  224. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
  225. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
  226. package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
  227. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
  228. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +4 -0
  229. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +1 -1
  230. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  231. package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
  232. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
  233. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
  234. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
  235. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  236. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
  237. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  238. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
  239. package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
  240. package/lib/types/es6/Core/index.d.ts +1 -5
  241. package/lib/types/es6/ExtensionOptions.d.ts +2 -0
  242. package/lib/types/es6/FilterInput.d.ts +4 -2
  243. package/lib/types/es6/InCellEditing.d.ts +8 -5
  244. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +9 -4
  245. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
  246. package/lib/types/es6/RealtimeGrid/Grid.d.ts +31 -16
  247. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  248. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +12 -7
  249. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -1
  250. package/lib/types/es6/RowColoring.d.ts +2 -0
  251. package/lib/types/es6/RowDragging.d.ts +3 -4
  252. package/lib/types/es6/RowFiltering.d.ts +2 -0
  253. package/lib/types/es6/RowGrouping.d.ts +7 -2
  254. package/lib/types/es6/RowSegmenting.d.ts +8 -2
  255. package/lib/types/es6/RowSelection.d.ts +13 -9
  256. package/lib/types/es6/TextFormatting.d.ts +1 -1
  257. package/lib/types/es6/Zoom.d.ts +2 -1
  258. package/lib/types/es6/index.d.ts +3 -0
  259. package/lib/versions.json +22 -21
  260. package/lib/zoom/es6/Zoom.d.ts +2 -1
  261. package/lib/zoom/es6/Zoom.js +11 -4
  262. package/package.json +7 -7
  263. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  264. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
  265. package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
  266. package/lib/core/es6/grid/plugins/Plugin.js +0 -272
  267. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  268. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -11,6 +11,7 @@ import TrackLayout from "./util/TrackLayout.js";
11
11
  import SelectionList from "./util/SelectionList.js";
12
12
  import ILayoutGrid from "./ILayoutGrid.js";
13
13
  import ElementWrapper from "./components/ElementWrapper.js";
14
+ import HScrollbar from "./components/HScrollbar.js";
14
15
  /* eslint-enable */
15
16
 
16
17
  //#region Events
@@ -32,15 +33,15 @@ import ElementWrapper from "./components/ElementWrapper.js";
32
33
  /**
33
34
  * Please see {@link ILayoutGrid} for full APIs and parameter lists.
34
35
  * @constructor
35
- * @param {Element|null=} opt_initializer this can be either element id (string) or DOM element
36
- * @param {Object=} opt_options
36
+ * @param {Object=} options
37
37
  * @extends {ElementWrapper}
38
38
  */
39
- var LayoutGrid = function (opt_initializer, opt_options) {
39
+ var LayoutGrid = function (options) {
40
40
  var _t = this;
41
41
 
42
42
  _t._onMouseMove = _t._onMouseMove.bind(_t);
43
43
  _t._onMouseOut = _t._onMouseOut.bind(_t);
44
+ _t._onResetTransformIE = _t._onResetTransformIE.bind(_t);
44
45
 
45
46
  _t._trackX = new TrackLayout();
46
47
  _t._trackY = new TrackLayout();
@@ -49,7 +50,7 @@ var LayoutGrid = function (opt_initializer, opt_options) {
49
50
 
50
51
  _t._cellSpans = new CellSpans();
51
52
 
52
- _t._element = opt_initializer ? opt_initializer : document.createElement("div");
53
+ _t._element = document.createElement("div");
53
54
  _t._element.className = "tr-lg tr-even-shading";
54
55
 
55
56
  _t._ctxRows = new VirtualItems(); // Context rows act as a virtual column storing UI context or metadata for rows
@@ -59,8 +60,14 @@ var LayoutGrid = function (opt_initializer, opt_options) {
59
60
  _t._stretchedCells = new StretchedCells(_t._trackX, _t._trackY, _t);
60
61
  _t._selectionList = new SelectionList();
61
62
 
62
- if (opt_options) {
63
- _t._virOwner = opt_options["owner"] || null;
63
+ if (options) {
64
+ _t._virOwner = options["owner"] || null;
65
+ if(options["horizontalScrollbar"]) {
66
+ _t._hscrollbar = options["horizontalScrollbar"];
67
+ }
68
+ }
69
+ if(!_t._virOwner) {
70
+ _t._element.classList.add("section");
64
71
  }
65
72
 
66
73
  _t._addEvent("rowHighlighted");
@@ -72,19 +79,11 @@ var LayoutGrid = function (opt_initializer, opt_options) {
72
79
  Ext.inherits(LayoutGrid, ElementWrapper);
73
80
 
74
81
  /**
75
- * For virtualization in Y-Axis
76
82
  * @type {number}
77
83
  * @private
78
84
  */
79
85
  LayoutGrid.prototype._index = -1;
80
86
 
81
- /**
82
- * For virtualization in Y-Axis
83
- * @type {number}
84
- * @private
85
- */
86
- LayoutGrid.prototype._indexOffset = 0;
87
-
88
87
  /**
89
88
  * For virtualization in Y-Axis
90
89
  * @type {number}
@@ -163,11 +162,14 @@ LayoutGrid.prototype._firstColumn;
163
162
  */
164
163
  LayoutGrid.prototype._lastColumn;
165
164
 
166
- /**
167
- * @type {Element}
168
- * @private
169
- */
165
+ /** @type {Element}
166
+ * @private
167
+ */
170
168
  LayoutGrid.prototype._rightSpace;
169
+ /** @type {number}
170
+ * @private
171
+ */
172
+ LayoutGrid.prototype._rightSpaceSize = 0;
171
173
 
172
174
  /**
173
175
  * @type {boolean}
@@ -247,6 +249,18 @@ LayoutGrid.prototype._transformIETimer = 0;
247
249
  * @private
248
250
  */
249
251
  LayoutGrid.prototype._ctxRows;
252
+ /** @type {Element}
253
+ * @private
254
+ */
255
+ LayoutGrid.prototype._boundLayer = null;
256
+ /** @type {Element}
257
+ * @private
258
+ */
259
+ LayoutGrid.prototype._columnBound = null;
260
+ /** @type {HScrollbar}
261
+ * @private
262
+ */
263
+ LayoutGrid.prototype._hscrollbar = null;
250
264
 
251
265
 
252
266
  /**
@@ -269,6 +283,7 @@ LayoutGrid.prototype.dispose = function () {
269
283
 
270
284
  this._highlightedCells.length = 0;
271
285
  this._ctx = null;
286
+ this._hscrollbar = null;
272
287
 
273
288
  this._dispose();
274
289
  };
@@ -277,11 +292,13 @@ LayoutGrid.prototype.dispose = function () {
277
292
  * @override
278
293
  */
279
294
  LayoutGrid.prototype.getWidth = function () {
280
- if (this.isVisible() === false) {
281
- return 0;
282
- }
283
-
284
- return this.getContentWidth();
295
+ return this.isVisible() ? this._getWidth() : 0;
296
+ };
297
+ /** @private
298
+ * @return {number}
299
+ */
300
+ LayoutGrid.prototype._getWidth = function () {
301
+ return this.getContentWidth() + this._rightSpaceSize;
285
302
  };
286
303
 
287
304
  /**
@@ -293,8 +310,7 @@ LayoutGrid.prototype.setWidth = function (px) {
293
310
  return false;
294
311
  }
295
312
 
296
- var reserveSpace = this._rightSpace ? this._rightSpace.offsetWidth : 0;
297
- var changes = this._trackX.setTrackSize(px, reserveSpace); // WARNING: Perform scalling instead of setting width directly
313
+ var changes = this._trackX.setTrackSize(px - this._rightSpaceSize); // WARNING: Perform scalling instead of setting width directly
298
314
 
299
315
  if (changes == null) {
300
316
  return false;
@@ -326,7 +342,7 @@ LayoutGrid.prototype.setHeight = function (px) {
326
342
  return false;
327
343
  }
328
344
 
329
- var changes = this._trackY.setTrackSize(px, 0); // WARNING: Perform scalling instead of setting height directly
345
+ var changes = this._trackY.setTrackSize(px); // WARNING: Perform scalling instead of setting height directly
330
346
 
331
347
  if (changes == null) {
332
348
  return true;
@@ -362,7 +378,7 @@ LayoutGrid.prototype.hitTest = function (x, y, opt_omitSpan) {
362
378
  return null;
363
379
  }
364
380
 
365
- if (x >= this.getWidth()) {
381
+ if (x >= this.getContentWidth()) {
366
382
  return null;
367
383
  }
368
384
 
@@ -407,7 +423,7 @@ LayoutGrid.prototype.hitTestX = function (x) {
407
423
  return -1;
408
424
  }
409
425
 
410
- if (x >= this.getWidth()) {
426
+ if (x >= this.getContentWidth()) {
411
427
  return ~this._colCount;
412
428
  }
413
429
 
@@ -512,6 +528,22 @@ LayoutGrid.prototype._setColumnWidth = function (indexX, val) {
512
528
  LayoutGrid.prototype._updateColumnLayout = function () {
513
529
  this._syncLayoutToColumns(0);
514
530
  };
531
+ /** @public
532
+ * @ignore
533
+ * @param {boolean} enabled
534
+ * @param {number=} fromR
535
+ * @param {number=} toR
536
+ */
537
+ LayoutGrid.prototype._startBindingSession = function (enabled, fromR, toR) {
538
+ // Prevent error when calling _startBindingSession in LayoutGrid
539
+ };
540
+ /** @public
541
+ * @ignore
542
+ * @return {Array<boolean>}
543
+ */
544
+ LayoutGrid.prototype._getTempRowHeights = function () {
545
+ return null;
546
+ };
515
547
 
516
548
  /**
517
549
  * {@link ILayoutGrid#getRowHeight}
@@ -982,7 +1014,7 @@ LayoutGrid.prototype.setColumnCount = function (val) {
982
1014
  }
983
1015
  }
984
1016
 
985
- // this._updateViewWidth(); // Core grid will guarantee updating width to each section
1017
+ // this._updateCssWidth(); // Core grid will guarantee updating width to each section
986
1018
  } else {
987
1019
  for (i = oldColCount; i < val; ++i) {
988
1020
  column = this._newColumn(i);
@@ -1353,6 +1385,11 @@ LayoutGrid.prototype.setRowHighlight = function (rowIndex) {
1353
1385
  this._highlightedCells[c] = cell;
1354
1386
  cell.addClass("highlighted-row");
1355
1387
  }
1388
+ var stretchEl = this.getStretchedCell(rowIndex); // check stretched cell
1389
+ if(stretchEl) {
1390
+ this._highlightedCells.push(stretchEl);
1391
+ stretchEl.addClass("highlighted-row");
1392
+ }
1356
1393
  } else {
1357
1394
  this._highlightedCells.length = 0;
1358
1395
  }
@@ -1621,7 +1658,7 @@ LayoutGrid.prototype.insertColumn = function (index, opt_json) {
1621
1658
  }
1622
1659
 
1623
1660
  this._updateCellSpans(cellSpans, true); // Restore all styling
1624
- this._calculateStretchSize(true);
1661
+ this._calculateViewSize(true);
1625
1662
  this._stretchedCells.updateXAxis();
1626
1663
  // this._syncLayoutToColumns(index); // Core grid will guarantee updating width to each section
1627
1664
 
@@ -1638,6 +1675,7 @@ LayoutGrid.prototype.insertColumn = function (index, opt_json) {
1638
1675
  cell.addClass("selected-row");
1639
1676
  }
1640
1677
  }
1678
+ // TODO: Check if it can insert column with stretch cell
1641
1679
  }
1642
1680
 
1643
1681
  column.activate(atTheMiddle || !this._colVir);
@@ -1676,7 +1714,7 @@ LayoutGrid.prototype.removeColumnAt = function (index) {
1676
1714
  this._syncLayoutToColumns(index);
1677
1715
 
1678
1716
  if (index >= this._colCount) {
1679
- this._updateViewWidth();
1717
+ this._updateCssWidth();
1680
1718
  }
1681
1719
 
1682
1720
  return definition;
@@ -1716,14 +1754,6 @@ LayoutGrid.prototype.moveColumn = function (from, to) {
1716
1754
  var nextSibling = this._columns[to + 1] || null;
1717
1755
  movedColumn.insertBefore(nextSibling);
1718
1756
 
1719
- if (this._rightSpace) {
1720
- var pn = this._rightSpace.parentNode;
1721
-
1722
- if (pn) {
1723
- pn.appendChild(this._rightSpace);
1724
- }
1725
- }
1726
-
1727
1757
  this._updateColumnIndices();
1728
1758
  this._updateCellSpans(cellSpans, true); // Restore all styling
1729
1759
 
@@ -1826,12 +1856,14 @@ LayoutGrid.prototype.setRowOffset = function (index) {
1826
1856
  this._rowOffset = index;
1827
1857
  };
1828
1858
 
1829
- /**
1830
- * {@link ILayoutGrid#updateLayout}
1831
- * @ignore
1832
- * @inheritDoc
1833
- */
1834
- LayoutGrid.prototype.updateLayout = function () {};
1859
+ /** @public
1860
+ * @ignore
1861
+ */
1862
+ LayoutGrid.prototype.updateLayout = function () {
1863
+ this._calculateViewSize(true); // Column bounds will be updated by trigger from Core
1864
+
1865
+ this._updateRightSpaceStyle();
1866
+ };
1835
1867
 
1836
1868
  /**
1837
1869
  * {@link ILayoutGrid#stretchCell}
@@ -1869,12 +1901,16 @@ LayoutGrid.prototype.stretchCell = function (cellRef, rowIndex, opt_stretching,
1869
1901
  this._updateLayers();
1870
1902
  }
1871
1903
 
1872
- this._calculateStretchSize();
1904
+ this._calculateViewSize();
1873
1905
  cell = this._stretchedCells.stretchCell(rowIndex, onlyToTheRight ? colIndex : 0);
1874
1906
  cell.setParent(coverLayer);
1875
1907
  } else {
1876
1908
  cell = this._stretchedCells.unstretchCell(rowIndex);
1877
1909
  }
1910
+ if(cell) {
1911
+ var selected = this._selectionList.getSelection(rowIndex);
1912
+ cell.enableClass("selected-row", selected); // It's can enable class without get stretch cell again.
1913
+ }
1878
1914
  return cell;
1879
1915
  };
1880
1916
 
@@ -1924,7 +1960,7 @@ LayoutGrid.prototype.updateStretchedCells = function () {
1924
1960
  if (childCount <= 0) {
1925
1961
  return false;
1926
1962
  }
1927
- this._calculateStretchSize(true);
1963
+ this._calculateViewSize(true);
1928
1964
 
1929
1965
  this._stretchedCells.updateCells();
1930
1966
  return childCount ? true : false;
@@ -1932,20 +1968,51 @@ LayoutGrid.prototype.updateStretchedCells = function () {
1932
1968
 
1933
1969
  /** @private
1934
1970
  * @param {boolean=} forceRecal
1971
+ * @return {number}
1935
1972
  */
1936
- LayoutGrid.prototype._calculateStretchSize = function (forceRecal) {
1973
+ LayoutGrid.prototype._calculateViewSize = function (forceRecal) {
1937
1974
  var ctx = this._ctx;
1938
1975
  var stretchSize = forceRecal ? 0 : this._stretchedCells.getStretchSize();
1939
1976
  if(!stretchSize && ctx) {
1940
1977
  if(ctx["getWidth"]) {
1978
+ var contentWidth = this.getContentWidth();
1941
1979
  stretchSize = ctx["getWidth"]();
1942
- var contentWidth = this.getContentWidth(); // TODO: Subtract 1px for border
1943
- if(contentWidth < stretchSize) { // If view width is larger than actual content
1944
- stretchSize = contentWidth;
1980
+ if(stretchSize) { // Grid may not be in the document
1981
+ if(!ctx.hasClass("no-borders")) {
1982
+ stretchSize -= 1;
1983
+ }
1984
+ if(contentWidth < stretchSize) { // If view width is larger than actual content
1985
+ stretchSize = contentWidth;
1986
+ }
1987
+ this._stretchedCells.setStretchSize(stretchSize);
1988
+ return stretchSize;
1989
+ } else {
1990
+ return contentWidth;
1945
1991
  }
1946
- this._stretchedCells.setStretchSize(stretchSize);
1947
1992
  }
1948
1993
  }
1994
+ return stretchSize;
1995
+ };
1996
+
1997
+ /**
1998
+ * @private
1999
+ * @param {number} rowIndex
2000
+ * @param {string} className
2001
+ * @param {boolean} enabled
2002
+ */
2003
+ LayoutGrid.prototype._enableStretchCellClass = function (rowIndex, className, enabled ) {
2004
+ var stretchEl = this.getStretchedCell(rowIndex); // check stretched cell
2005
+ if(stretchEl) {
2006
+ stretchEl.enableClass(className, enabled);
2007
+ }
2008
+ };
2009
+ /** View size is width of container (Grid's pane) or content (LayoutGrid's columns), whichever is smaller.
2010
+ * @public
2011
+ * @ignore
2012
+ * @return {number}
2013
+ */
2014
+ LayoutGrid.prototype._getViewSize = function () {
2015
+ return this._calculateViewSize();
1949
2016
  };
1950
2017
 
1951
2018
  /**
@@ -2011,8 +2078,9 @@ LayoutGrid.prototype.reserveRightSpace = function (size) {
2011
2078
  }
2012
2079
 
2013
2080
  this._rightSpace.style.width = size + "px";
2081
+ this._rightSpaceSize = size;
2014
2082
 
2015
- this._updateViewWidth();
2083
+ this._updateCssWidth();
2016
2084
  } else if (this._rightSpace) {
2017
2085
  var pn = this._rightSpace.parentNode;
2018
2086
 
@@ -2021,20 +2089,30 @@ LayoutGrid.prototype.reserveRightSpace = function (size) {
2021
2089
  }
2022
2090
 
2023
2091
  this._rightSpace = null;
2092
+ this._rightSpaceSize = 0;
2024
2093
 
2025
- this._updateViewWidth();
2094
+ this._updateCssWidth();
2026
2095
  }
2027
2096
 
2028
2097
  return this._rightSpace;
2029
2098
  };
2030
2099
 
2031
- /**
2032
- * @public
2033
- * @ignore
2034
- * @param {boolean} absolutePos if true, the right space element will be positioned absolutely
2035
- */
2036
- LayoutGrid.prototype._updateRightSpaceStyle = function(absolutePos) {
2100
+ /** @public
2101
+ * @ignore
2102
+ */
2103
+ LayoutGrid.prototype._updateRightSpaceStyle = function() {
2037
2104
  var rs = this._rightSpace;
2105
+ if(!rs) {
2106
+ return;
2107
+ }
2108
+ var isScrollbarActive = false;
2109
+ var pinnedRgtCount = 0;
2110
+ if(this._hscrollbar) {
2111
+ isScrollbarActive = this._hscrollbar.isActive();
2112
+ pinnedRgtCount = this._hscrollbar.getPinnedRightColumnCount();
2113
+ }
2114
+ var absolutePos = isScrollbarActive && !pinnedRgtCount; // if true, the right space element will be positioned absolutely
2115
+
2038
2116
  if (absolutePos) {
2039
2117
  rs.style.top = this._trackY.getLaneStart(this._activeRow) + "px";
2040
2118
  rs.style.left = this._trackX.getLaneStart(this._colCount) + "px";
@@ -2058,6 +2136,9 @@ LayoutGrid.prototype._updateLayers = function() {
2058
2136
  this._element.appendChild(this._rightSpace);
2059
2137
  }
2060
2138
  }
2139
+ if(this._boundLayer) {
2140
+ this._element.appendChild(this._boundLayer);
2141
+ }
2061
2142
  if(this._coverLayer) {
2062
2143
  this._element.appendChild(this._coverLayer); // The layer should always on top
2063
2144
  }
@@ -2126,6 +2207,153 @@ LayoutGrid.prototype.getContextRow = function (rowIndex) {
2126
2207
  return this._ctxRows.getItem(rowIndex);
2127
2208
  };
2128
2209
 
2210
+ /** @public
2211
+ * @param {number} colIndex
2212
+ * @param {boolean=} selected
2213
+ */
2214
+ LayoutGrid.prototype.selectColumn = function (colIndex, selected) {
2215
+ this.enableColumnClass(colIndex, "selected-column", selected);
2216
+
2217
+ var columnBound = this._columnBound;
2218
+ if(!columnBound) {
2219
+ columnBound = this._columnBound = document.createElement("div");
2220
+ columnBound.className = "selection-bound column-bound";
2221
+ }
2222
+ var boundLayer = this._boundLayer;
2223
+ if(!boundLayer) {
2224
+ boundLayer = this._boundLayer = document.createElement("div");
2225
+ boundLayer.className = "cover-layer";
2226
+ this._updateLayers();
2227
+ }
2228
+ };
2229
+ /** @public
2230
+ * @param {number} colIndex
2231
+ * @return {boolean}
2232
+ */
2233
+ LayoutGrid.prototype.isSelectedColumn = function (colIndex) {
2234
+ return this.hasColumnClass(colIndex, "selected-column");
2235
+ };
2236
+ /** @public
2237
+ * @param {number} colIndex
2238
+ * @param {number} rowIndex
2239
+ * @param {boolean=} selected
2240
+ */
2241
+ LayoutGrid.prototype.selectCell = function (colIndex, rowIndex, selected) {
2242
+ var cell = this._getCell(colIndex, rowIndex);
2243
+ if(cell) {
2244
+ cell.enableClass("selection", selected);
2245
+ }
2246
+ };
2247
+ /** @public
2248
+ * @param {number} colIndex
2249
+ * @param {number} rowIndex
2250
+ * @param {number} width
2251
+ * @param {number} height
2252
+ */
2253
+ LayoutGrid.prototype.setCellBounds = function (colIndex, rowIndex, width, height) {};
2254
+ /** @public
2255
+ * @ignore
2256
+ * @return {!TrackLayout}
2257
+ */
2258
+ LayoutGrid.prototype.getHorizontalLayout = function () {
2259
+ return this._trackX;
2260
+ };
2261
+ /** @public
2262
+ * @ignore
2263
+ * @param {number} lftIdx
2264
+ * @param {number} rgtIdx Inclusive index
2265
+ * @param {!Array.<number>} outPositions
2266
+ * @param {!Array.<boolean>} outNoBorders
2267
+ */
2268
+ LayoutGrid.prototype.calculateColumnBounds = function (lftIdx, rgtIdx, outPositions, outNoBorders) {
2269
+ var lftPx = 0;
2270
+ var rgtPx = 0;
2271
+ var noLftBorder = false;
2272
+ var noRgtBorder = false;
2273
+ var pinnedRgtIdx = this._trackX.getLaneCount();
2274
+ if(lftIdx >= 0) {
2275
+ lftPx = this._trackX.getLaneStart(lftIdx);
2276
+ rgtPx = this._trackX.getLaneEnd(rgtIdx);
2277
+ }
2278
+ if(lftPx < rgtPx) {
2279
+ var lftView = 0;
2280
+ var rgtView, rgtLimit;
2281
+ var scrollLeft = 0;
2282
+ var pinnedLftCount = 0;
2283
+ var pinnedRgtCount = 0;
2284
+ if(this._hscrollbar) {
2285
+ scrollLeft = this._hscrollbar.getScrollLeft();
2286
+ pinnedLftCount = this._hscrollbar.getPinnedLeftColumnCount();
2287
+ pinnedRgtCount = this._hscrollbar.getPinnedRightColumnCount();
2288
+ }
2289
+ rgtView = rgtLimit = this._trackX.getTrackSize();
2290
+ if(pinnedLftCount) {
2291
+ lftView = this._trackX.getLaneStart(pinnedLftCount);
2292
+ }
2293
+ if(pinnedRgtCount) {
2294
+ pinnedRgtIdx -= pinnedRgtCount;
2295
+ rgtView = this._getViewSize() - rgtLimit + this._trackX.getLaneStart(pinnedRgtIdx);
2296
+ }
2297
+ if(lftIdx >= pinnedLftCount && lftIdx < pinnedRgtIdx) {
2298
+ lftPx -= scrollLeft;
2299
+ if(lftPx < lftView) {
2300
+ lftPx = lftView;
2301
+ noLftBorder = true;
2302
+ } else if(lftPx > rgtView) {
2303
+ lftPx = rgtView;
2304
+ noLftBorder = true;
2305
+ }
2306
+ } else if(lftIdx >= pinnedRgtIdx) {
2307
+ lftPx = this._getViewSize() - rgtLimit + this._trackX.getLaneStart(lftIdx);
2308
+ }
2309
+ if(rgtIdx >= pinnedLftCount && rgtIdx < pinnedRgtIdx) {
2310
+ rgtPx -= scrollLeft;
2311
+ if(rgtPx < lftView) {
2312
+ rgtPx = lftView;
2313
+ noRgtBorder = true;
2314
+ } else if(rgtPx > rgtView) {
2315
+ rgtPx = rgtView;
2316
+ noRgtBorder = true;
2317
+ }
2318
+ } else if(rgtIdx >= pinnedRgtIdx) {
2319
+ rgtPx = this._getViewSize() - rgtLimit + this._trackX.getLaneEnd(rgtIdx);
2320
+ }
2321
+ }
2322
+ outPositions[0] = lftPx;
2323
+ outPositions[1] = rgtPx;
2324
+ outNoBorders[0] = noLftBorder;
2325
+ outNoBorders[1] = noRgtBorder;
2326
+ };
2327
+ /** @public
2328
+ * @ignore
2329
+ * @param {!Array.<number>} positions Left and right bound positions in pixel
2330
+ * @param {!Array.<boolean>} noBorders Boolean values indicating existence of left and right CSS borders
2331
+ */
2332
+ LayoutGrid.prototype.updateColumnBounds = function (positions, noBorders) {
2333
+ var columnBound = this._columnBound;
2334
+ if(!columnBound) {
2335
+ return;
2336
+ }
2337
+
2338
+ var lftPx = positions[0];
2339
+ var rgtPx = positions[1];
2340
+ if(lftPx >= rgtPx) {
2341
+ var pn = columnBound.parentNode;
2342
+ if(pn) {
2343
+ pn.removeChild(columnBound);
2344
+ }
2345
+ } else {
2346
+ columnBound.style.left = lftPx + "px";
2347
+ columnBound.style.width = (rgtPx - lftPx) + "px";
2348
+
2349
+ columnBound.style.height = this._trackY.getTrackSize() + "px";
2350
+ columnBound.classList.toggle("no-left-bound", noBorders[0]);
2351
+ columnBound.classList.toggle("no-right-bound", noBorders[1]);
2352
+ if(this._boundLayer) {
2353
+ this._boundLayer.appendChild(columnBound);
2354
+ }
2355
+ }
2356
+ };
2129
2357
 
2130
2358
  /**
2131
2359
  * @private
@@ -2206,33 +2434,19 @@ LayoutGrid.prototype._newColumn = function (indexX) {
2206
2434
  column.insertBefore(nextColumn);
2207
2435
  }
2208
2436
 
2209
- if (this._rightSpace) {
2210
- var pn = this._rightSpace.parentNode;
2211
-
2212
- if (pn) {
2213
- pn.appendChild(this._rightSpace);
2214
- }
2215
- }
2216
-
2217
2437
  return column;
2218
2438
  };
2219
2439
 
2220
- /**
2440
+ /** Update LayoutGrid CSS width. Grid width is calculated from summation of each column width plus reserved right space
2221
2441
  * @private
2222
2442
  */
2223
- LayoutGrid.prototype._updateViewWidth = function () { // This method is also called by _syncLayoutToColumns()
2224
- if (this._frozenLayout) {
2225
- return;
2226
- }
2227
-
2228
- this._calculateStretchSize(true);
2229
- this._stretchedCells.updateXAxis();
2230
- var contentWidth = this.getContentWidth();
2443
+ LayoutGrid.prototype._updateCssWidth = function () { // This method is also called by _syncLayoutToColumns()
2444
+ if (!this._frozenLayout) {
2445
+ this._calculateViewSize(true);
2446
+ this._stretchedCells.updateXAxis();
2231
2447
 
2232
- if (this._rightSpace) {
2233
- contentWidth += this._rightSpace.offsetWidth;
2448
+ this._element.style.width = this._getWidth() + "px"; // View is kept in sync with content size
2234
2449
  }
2235
- this._element.style.width = contentWidth + "px"; // View is kept in sync with content size
2236
2450
  };
2237
2451
 
2238
2452
  /**
@@ -2318,7 +2532,7 @@ LayoutGrid.prototype._syncLayoutToColumns = function (from) {
2318
2532
  }
2319
2533
 
2320
2534
  this._updateCellSpanLayout(this._cellSpans.getAllSpans());
2321
- this._updateViewWidth();
2535
+ this._updateCssWidth();
2322
2536
  return true;
2323
2537
  };
2324
2538
 
@@ -2475,11 +2689,16 @@ LayoutGrid.prototype._updateCellSpans = function (cellSpans, adding) {
2475
2689
  */
2476
2690
  LayoutGrid.prototype._onMouseMove = function (e) {
2477
2691
  var target = e["target"];
2478
- var colElement = Util.closestElement(target, "column");
2479
- var colIndex = this.getColumnIndex(colElement);
2480
- var cellElement = (colIndex >= 0) ? Util.closestElement(target, "cell") : null;
2481
2692
 
2482
- this.setRowHighlight(this.getCellIndex(colIndex, cellElement));
2693
+ var cellElement = Util.closestElement(target, "cell");
2694
+ var colIndex = this._stretchedCells.getColumnIndex(cellElement);
2695
+ if(colIndex < 0) { // Not found colIndex in stretching cell, then get from normal row
2696
+ var colElement = Util.closestElement(target, "column");
2697
+ colIndex = this.getColumnIndex(colElement);
2698
+ }
2699
+ var rowIndex = this.getCellIndex(colIndex, cellElement);
2700
+
2701
+ this.setRowHighlight(rowIndex);
2483
2702
  };
2484
2703
 
2485
2704
  /**
@@ -2510,27 +2729,16 @@ LayoutGrid.prototype._onMouseOut = function (e) {
2510
2729
  */
2511
2730
  LayoutGrid.prototype._updateSelectionUI = function (rowIndex) { // Update UI of the specified row index
2512
2731
  var selected = this._selectionList.getSelection(rowIndex);
2513
-
2514
- for (var c = 0; c < this._colCount; ++c) {
2515
- var cell = this._columns[c].getCell(rowIndex);
2516
-
2517
- if (cell) {
2518
- cell.enableClass("selected-row", selected);
2519
- }
2520
- }
2732
+ this._enableStretchCellClass(rowIndex, "selected-row", selected);
2733
+ this.enableRowClass(rowIndex, "selected-row", selected);
2521
2734
  };
2522
2735
 
2523
2736
  /** @private
2524
2737
  * @param {number} rowIndex
2525
2738
  */
2526
2739
  LayoutGrid.prototype._addSelectionUI = function (rowIndex) {
2527
- for (var c = 0; c < this._colCount; ++c) {
2528
- var cell = this._columns[c].getCell(rowIndex);
2529
-
2530
- if (cell) {
2531
- cell.addClass("selected-row");
2532
- }
2533
- }
2740
+ this._enableStretchCellClass(rowIndex, "selected-row", true);
2741
+ this.enableRowClass(rowIndex, "selected-row", true);
2534
2742
  };
2535
2743
 
2536
2744
  /**
@@ -2538,13 +2746,8 @@ LayoutGrid.prototype._addSelectionUI = function (rowIndex) {
2538
2746
  * @param {number} rowIndex
2539
2747
  */
2540
2748
  LayoutGrid.prototype._removeSelectionUI = function (rowIndex) {
2541
- for (var c = 0; c < this._colCount; ++c) {
2542
- var cell = this._columns[c].getCell(rowIndex);
2543
-
2544
- if (cell) {
2545
- cell.removeClass("selected-row");
2546
- }
2547
- }
2749
+ this._enableStretchCellClass(rowIndex, "selected-row", false);
2750
+ this.enableRowClass(rowIndex, "selected-row", false);
2548
2751
  };
2549
2752
 
2550
2753
  /**
@@ -2585,7 +2788,7 @@ LayoutGrid.prototype._resetTransformIETimer = function () {
2585
2788
  if (Util.isIE) {
2586
2789
  if(!this._transformIETimer) {
2587
2790
  this.enableClass("reset-transform");
2588
- this._transformIETimer = setTimeout(this._onResetTransformIE.bind(this), 20);
2791
+ this._transformIETimer = setTimeout(this._onResetTransformIE, 20);
2589
2792
  }
2590
2793
  }
2591
2794
  };