summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-09 13:54:46 -0400
committerDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-09 13:54:46 -0400
commit41d8c33a6b87c948a7fe4ae5e53483d42fead422 (patch)
tree8308a25c8343839e617e0335606a641ab3be8331 /templates
parent0aa550c75b38f0694efcb0fa452b08ddd200632c (diff)
Re-layout with masonry whenever a widget is ready.
Diffstat (limited to 'templates')
-rw-r--r--templates/project/dashboards/layout.erb7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/project/dashboards/layout.erb b/templates/project/dashboards/layout.erb
index 1d1aeb3..97cb96d 100644
--- a/templates/project/dashboards/layout.erb
+++ b/templates/project/dashboards/layout.erb
@@ -22,12 +22,13 @@
$('#container ul').masonry({ itemSelector: '.widget-container' });
}
- Dashing.on('ready', function() {
- setTimeout(relayout, 0);
+ Dashing.Widget.on('ready', function(){
+ setTimeout(function(){
+ relayout();
+ }, 0);
});
$(window).resize(relayout);
-
</script>
</head>
<body>