updated docs and dist

This commit is contained in:
vieron
2012-07-24 10:35:07 +02:00
parent 443d0fbc29
commit 62caa4abf7
9 changed files with 164 additions and 164 deletions

View File

@@ -141,10 +141,10 @@
var el = this.el;
if (el && !update) {
this.data = {} || el.offset();
this.data = el.offset();
this.data.width = el.width();
this.data.height = el.height();
};
}
if (el && update && !not_update_offsets) {
var offset = el.offset();

View File

@@ -150,7 +150,7 @@
this.player_min_left = 0 + this.options.offset_left;
this.init();
};
}
var fn = Draggable.prototype;
@@ -177,7 +177,7 @@
fn.drag_handler = function(e) {
if (e.which !== 1) {
return false;
};
}
var self = this;
var first = true;
@@ -203,7 +203,7 @@
if (self.is_dragging == true) {
throttle(self.on_dragmove.call(self, mme), 130);
};
}
return false;
@@ -231,7 +231,7 @@
this.options.start.call(this.$player, e, {
helper: this.helper ? this.$helper : this.$player
});
};
}
return false;
};
@@ -251,12 +251,12 @@
}else if(left < this.player_min_left) {
left = this.player_min_left;
}
};
}
return {
left: left,
top: top
}
};
};
@@ -293,7 +293,7 @@
'left': offset.left,
'top': offset.top
}
}
};
if (this.options.stop) {
this.options.stop.call(this.$player, e, ui);

View File

@@ -210,7 +210,7 @@
this.$wrapper.find('.player-revert').removeClass('player-revert');
this.drag_api.disable();
return this;
}
};
/**
@@ -222,7 +222,7 @@
fn.enable = function() {
this.drag_api.enable();
return this;
}
};
/**
@@ -324,7 +324,7 @@
if (callback) {
callback.apply(this, el);
};
}
}, this));
};
@@ -393,7 +393,7 @@
'data-sizex': wgd.size_x,
'data-sizey': wgd.size_y
});
};
}
// attach Coord object to player data-coord attribute
$el.data('coords', $el.coords());
@@ -564,7 +564,7 @@
var abs_offset = {
left: ui.position.left + this.baseX,
top: ui.position.top + this.baseY
}
};
this.colliders_data = this.collision_api.get_closest_colliders(
abs_offset);
@@ -836,7 +836,7 @@
* Sorts an Array of grid coords objects (representing the grid coords of
* each widget) placing first the empty cells upper left.
*
* @method sort_by_row_asc
* @method sort_by_row_and_col_asc
* @param {Array} widgets Array of grid coords objects
* @return {Array} Returns the array sorted.
*/
@@ -856,7 +856,7 @@
* Sorts an Array of grid coords objects by column (representing the grid
* coords of each widget) in ascending way.
*
* @method sort_by_row_asc
* @method sort_by_col_asc
* @param {Array} widgets Array of grid coords objects
* @return {Array} Returns the array sorted.
*/
@@ -1122,7 +1122,7 @@
var right_col = (col + phgd.size_x - 1);
if (right_col > this.cols) {
col = col - (right_col - col);
};
}
var moved_down = this.placeholder_grid_data.row < row;
var changed_column = this.placeholder_grid_data.col !== col;
@@ -2021,19 +2021,19 @@
$widgets = $widgets.add(
this.$widgets.filter(function() {
var tcol = $(this).attr('data-col');
return (tcol == col || tcol > col);
return (tcol === col || tcol > col);
})
);
};
}
if (row) {
$widgets = $widgets.add(
this.$widgets.filter(function() {
var trow = $(this).attr('data-row');
return (trow == row || trow > row);
return (trow === row || trow > row);
})
);
};
}
return $widgets;
}
@@ -2085,7 +2085,7 @@
// don't duplicate stylesheets for the same configuration
if ($.inArray(serialized_opts, Gridster.generated_stylesheets) >= 0) {
return false;
};
}
Gridster.generated_stylesheets.push(serialized_opts);