소스 검색

HUE-8133 [dashboard] Maximize the grid space when loading a saved dashboard too

Enrico Berti 8 년 전
부모
커밋
8e0a86f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      desktop/core/src/desktop/static/desktop/js/gridster-knockout.js

+ 2 - 1
desktop/core/src/desktop/static/desktop/js/gridster-knockout.js

@@ -71,6 +71,8 @@ ko.bindingHandlers.gridster = {
         });
       ko.applyBindingsToDescendants(childBindingContext, addedWidget.get(0));
 
+      huePubSub.publish('gridster.added.widget', addedWidget);
+
       return addedWidget;
     };
 
@@ -93,7 +95,6 @@ ko.bindingHandlers.gridster = {
         switch (change.status) {
           case 'added':
             var addedWidget = addWidget(change.value);
-            huePubSub.publish('gridster.added.widget', addedWidget);
             if (change.value.callback) {
               ko.unwrap(change.value.callback)(addedWidget);
             }