jmuehlner commented on code in PR #796:
URL: https://github.com/apache/guacamole-client/pull/796#discussion_r1119107481


##########
guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js:
##########
@@ -40,33 +40,38 @@ angular.module('clipboard').directive('guacClipboard', 
['$injector',
     var config = {
         restrict    : 'E',
         replace     : true,
+        scope: {
+            /**
+             * When isActive is set to true then the Clipboard data will be
+             * displayed in the Clipboard Editor. When false, the Clipboard 
Editor
+             * will not be updated with Clipboard data.
+             * 
+             * @type Boolean
+             */
+            isActive : '=?',
+        },
         templateUrl : 'app/clipboard/templates/guacClipboard.html'
     };
 
     // guacClipboard directive controller
     config.controller = ['$scope', '$injector', '$element',
             function guacClipboardController($scope, $injector, $element) {
 
-        /**
-         * The DOM element which will contain the clipboard contents within the
-         * user interface provided by this directive.
-         *
-         * @type Element
-         */
-        var element = $element[0];
-
+        // Check if isActive was defined. If not default to false
+        $scope.isActive = angular.isDefined($scope.isActive) ? $scope.isActive 
: false;

Review Comment:
   What is this logic for? When would `$scope.isActive` be defined at 
controller initialization time?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to