Repository: flex-sdk Updated Branches: refs/heads/develop 8f3dd5bb0 -> 0dff7f486
FLEX-35126 Removing unused variables, making elligible functions static, correcting an asdoc typo, and removing superfluous multiplication by 1. Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/a797884a Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/a797884a Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/a797884a Branch: refs/heads/develop Commit: a797884adf4c2c1484c83ba2780ec8adbc06b095 Parents: 8f3dd5b Author: Mihai Chira <mih...@apache.org> Authored: Mon Sep 19 11:42:53 2016 +0200 Committer: Mihai Chira <mih...@apache.org> Committed: Mon Sep 19 11:42:53 2016 +0200 ---------------------------------------------------------------------- .../src/mx/controls/listClasses/AdvancedListBase.as | 3 +-- .../HierarchicalCollectionView_FLEX_34775_Tests.as | 4 ++-- .../src/mx/managers/NativeDragManagerImpl.as | 2 +- .../src/spark/components/gridClasses/GridViewLayout.as | 12 ++++-------- 4 files changed, 8 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a797884a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as index 8482454..854f0df 100644 --- a/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as +++ b/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as @@ -5401,7 +5401,6 @@ public class AdvancedListBase extends ScrollControlBase var selectionChange:Boolean = false; var placeHolder:CursorBookmark = iterator.bookmark; var index:int = itemRendererToIndex(item); - var data:Object; var uid:String = itemToUID(item.data); if (!allowMultipleSelection || (!shiftKey && !ctrlKey)) @@ -5508,7 +5507,7 @@ public class AdvancedListBase extends ScrollControlBase iterator.seek(placeHolder, 0); // if user is clicking with ctl key then - // seletion gets changed always. + // selection gets changed always. selectionChange = true; } http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a797884a/frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionView_FLEX_34775_Tests.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionView_FLEX_34775_Tests.as b/frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionView_FLEX_34775_Tests.as index 14bc2a3..b91d114 100644 --- a/frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionView_FLEX_34775_Tests.as +++ b/frameworks/projects/advancedgrids/tests/mx/collections/HierarchicalCollectionView_FLEX_34775_Tests.as @@ -101,7 +101,7 @@ package mx.collections { function filterOutLocationNode(node:DataNode):Boolean { return node && node.label != locationNodeName; - }; + } const locationNodeName:String = StringUtil.trim(HIERARCHY_STRING.split("\n")[2]); @@ -123,7 +123,7 @@ package mx.collections assertEquals(1, _sut.length); } - private function attemptNavigation(into:HierarchicalCollectionView):int + private static function attemptNavigation(into:HierarchicalCollectionView):int { var cursor:IViewCursor = into.createCursor(); var i:int = 0; http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a797884a/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as b/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as index 63ea9f2..5e582a0 100644 --- a/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as +++ b/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as @@ -390,7 +390,7 @@ public class NativeDragManagerImpl implements IDragManager { if (removeImage) _dragImage.removeEventListener(FlexEvent.UPDATE_COMPLETE, initiateDrag); - var dragBitmap:BitmapData + var dragBitmap:BitmapData; if (_dragImage.width && _dragImage.height) dragBitmap = new BitmapData(_dragImage.width, _dragImage.height, true, 0x000000); else http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/a797884a/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as b/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as index 4dbaf11..9c072b7 100644 --- a/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as +++ b/frameworks/projects/spark/src/spark/components/gridClasses/GridViewLayout.as @@ -685,7 +685,7 @@ public class GridViewLayout extends LayoutBase // so it could be seen when the indicator bounds are below the last row. // The issue is there may not be any space below the last row and the drop // indicator would not be visible if it started at the top of the next cell. - if (dropLocation.dropPoint.y > (bounds.top + (bounds.height * 1) / 2)) + if (dropLocation.dropPoint.y > (bounds.top + bounds.height / 2)) return new Rectangle(2, bounds.bottom - 2, bounds.width -4, 4); return new Rectangle(2, Math.max(0, bounds.y - 2), bounds.width - 4, 4); @@ -708,7 +708,7 @@ public class GridViewLayout extends LayoutBase clearSelectionIndicators(); - freeGridElement(hoverIndicator) + freeGridElement(hoverIndicator); hoverIndicator = null; freeGridElement(caretIndicator); @@ -844,7 +844,7 @@ public class GridViewLayout extends LayoutBase if (vspChanged && hspChanged) reason = "bothScrollPositions"; else if (vspChanged) - reason = "verticalScrollPosition" + reason = "verticalScrollPosition"; else if (hspChanged) reason = "horizontalScrollPosition"; @@ -1389,7 +1389,6 @@ public class GridViewLayout extends LayoutBase return; const columnCount:int = getColumnsLength(); - const columnGap:int = gridDimensionsView.columnGap; const requestedColumnCount:int = grid.requestedColumnCount; // TBD GridView... var measuredColumnCount:int = 0; @@ -1673,7 +1672,7 @@ public class GridViewLayout extends LayoutBase var colWidth:Number = gridDimensionsView.getColumnWidth(colIndex); layoutItemRenderer(renderer, cellX, cellY, colWidth, rowHeight); - var preferredRowHeight:Number = renderer.getPreferredBoundsHeight() + var preferredRowHeight:Number = renderer.getPreferredBoundsHeight(); gridDimensionsView.setCellHeight(rowIndex, colIndex, preferredRowHeight); cellX += colWidth + colGap; } @@ -2438,9 +2437,6 @@ public class GridViewLayout extends LayoutBase return indicator; } - private var mouseXOffset:Number = 0; - private var mouseYOffset:Number = 0; - private function layoutHoverIndicator(layer:GridLayer):void { const rowIndex:int = gridRowIndexToViewIndex(grid.hoverRowIndex);