Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix height calculations when dragging
  • Loading branch information
haugstrup committed Nov 9, 2011
1 parent 771dda7 commit add7457
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions public/board.css
Expand Up @@ -161,6 +161,7 @@ other bg: #cbe8a5
}
.story-item-state {
height:100%;
min-height:62px;
}
.story-item {
cursor:move;
Expand Down
13 changes: 10 additions & 3 deletions public/scrumboard.js
Expand Up @@ -35,12 +35,18 @@
var states = $(current_id).find('.state');
var max_height = 0;
states.each(function(){
var current_height = $(this).height();
var current_height = 0;
$(this).find('li').each(function(){
if (!$(this).attr('style')) {
current_height += $(this).outerHeight(true);
}
});

if (current_height > max_height) {
max_height = current_height;
}
});
states.height(max_height);
states.find('ul').height(max_height);
}

resize_stories();
Expand Down Expand Up @@ -73,7 +79,8 @@
if (state != old_state) {
var item_id = $(ui.draggable).data('id');
$(this).append(ui.draggable);
// $(this).css('background', '#eee');

set_story_height('#'+$(this).parents('.story-group').attr('id'));

// Make Ajax request to change state on Podio
$(ui.draggable).append('<div class="spinner"></div>');
Expand Down

0 comments on commit add7457

Please sign in to comment.