summary refs log tree commit diff
path: root/webclient/room/room-controller.js
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-15 17:58:51 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-15 17:58:51 +0100
commit60a9f27edbc961f5ae3b8daf1060dde5b3cc407d (patch)
treeb106b2f3be635b43469827404f37fd1cba3dd692 /webclient/room/room-controller.js
parentGet presence for members when you enter a room (it was coming down but wasn't... (diff)
downloadsynapse-60a9f27edbc961f5ae3b8daf1060dde5b3cc407d.tar.xz
Formatting
Diffstat (limited to 'webclient/room/room-controller.js')
-rw-r--r--webclient/room/room-controller.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 1b921325b3..3fc45bc782 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -16,30 +16,30 @@ limitations under the License.
 
 angular.module('RoomController', [])
 // FIXME move directives outta here!
-.directive("keepScroll", function(){
-  return {
-    controller : function($scope){
-      var element = 0;
-      this.setElement = function(el){
-        element = el;
-      }
-      this.addItem = function(item){
-        element.scrollTop = (element.scrollTop+item.clientHeight+1); //1px for margin
-      };
-    },
-    link : function(scope,el,attr, ctrl) {
-     ctrl.setElement(el[0]);
-    }
-  };
+.directive("keepScroll", function() {
+    return {
+        controller : function($scope) {
+            var element = 0;
+            this.setElement = function(el){
+                element = el;
+            }
+            this.addItem = function(item){
+                element.scrollTop = (element.scrollTop + item.clientHeight);
+            };
+        },
+        link : function(scope, el, attr, ctrl) {
+            ctrl.setElement(el[0]);
+        }
+    };
 })
 // FIXME move directives outta here!
 .directive("scrollItem", function(){
-  return{
-    require : "^keepScroll",
-    link : function(scope, el, att, scrCtrl){
-      scrCtrl.addItem(el[0]);
+    return {
+        require : "^keepScroll",
+        link : function(scope, el, att, scrCtrl){
+            scrCtrl.addItem(el[0]);
+        }
     }
-  }
 })
 .controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
                                function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {