From a4dd7307649cd3e64dcaa5a2485575dfbca183ff Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 18 Feb 2015 19:51:42 -0800 Subject: [PATCH] [Fixed Position] Allow select/deselect Allow select/deselect of individual elements in fixed position view, WTD-879. --- platform/features/layout/res/templates/fixed.html | 12 +++++++----- platform/features/layout/src/FixedController.js | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/platform/features/layout/res/templates/fixed.html b/platform/features/layout/res/templates/fixed.html index 5ebdccaf82..379fecb198 100644 --- a/platform/features/layout/res/templates/fixed.html +++ b/platform/features/layout/res/templates/fixed.html @@ -3,16 +3,18 @@ mct-resize="controller.setBounds(bounds)"> -
-
+ +
+
+
diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index 3899f40b4e..982d06fddc 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -20,8 +20,6 @@ define( function FixedController($scope, telemetrySubscriber, telemetryFormatter) { var gridSize = DEFAULT_GRID_SIZE, gridExtent = DEFAULT_GRID_EXTENT, - activeDrag, - activeDragId, subscription, cellStyles = [], elementProxies = [], @@ -213,20 +211,24 @@ define( * @returns {boolean} true if selected */ selected: function (element) { - return selection.selected(element); + return selection && selection.selected(element); }, /** * Set the active user selection in this view. * @param element the element to select */ select: function (element) { - selection.select(element); + if (selection) { + selection.select(element); + } }, /** * Clear the current user selection. */ clearSelection: function () { - selection.deselect(); + if (selection) { + selection.deselect(); + } }, /** * Start a drag gesture to move/resize a frame.