Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#4 content region heights

  • Loading branch information...
commit 93be3eac09998aac1712fe83113965d6c46d06ca 1 parent 4b757a9
Cory Gackenheimer cgack authored
Showing with 20 additions and 9 deletions.
  1. +20 −9 griddle.js
29 griddle.js
View
@@ -119,10 +119,16 @@ var griddle = {
$(griddleSelector + ".contentregion").each(function () {
var $tgt = $(this), childs, childsH = 0, rowId, rowH;
childs = $tgt.children().children(".moveable");
- childs.each(function () {
- childsH += $(this).height() + ($(this).height() * 0.01);
- });
- childsH += 15;
+
+ childsH += 55;
+ for (var i = 0; i < childs.length; i++) {
+ if (i === 0) {
+ childsH += 25;
+ } else {
+ childsH += 60;
+ }
+ }
+
$tgt.css("height", childsH + "px");
rowId = griddle.getRowId($tgt.offset().top, location);
rowH = $(".r" + rowId).height();
@@ -535,11 +541,16 @@ $.widget("hx.moveable", {
childs = $tgt.children().children(".moveable");
cln.data("sortorder", childs.length);
$tgt.children(".sortableinfo").remove();
-
- childs.each(function () {
- childsH += $(this).height() + ($(this).height() * 0.01);
- });
- childsH += 15;
+
+ childsH += 55;
+ for (var i = 0; i < childs.length; i++) {
+ if (i === 0) {
+ childsH += 25;
+ } else {
+ childsH += 60;
+ }
+ }
+
$tgt.css("height", childsH + "px");
rowId = griddle.getRowId($tgt.offset().top, locId);
$(".r" + rowId).css("height", childsH + "px");
Please sign in to comment.
Something went wrong with that request. Please try again.