This commit is contained in:
ali asaria 2014-09-13 01:55:57 -04:00
parent ecfd283b44
commit c319e56609

View file

@ -671,7 +671,8 @@ function adjustCard(offsets, doSync) {
var data = { var data = {
id: this.id, id: this.id,
position: { position: {
left: offset.col.position().left + (offset.x * offset.col.outerWidth()), left: offset.col.position().left + (offset.x * offset.col
.outerWidth()),
top: parseInt(card.css('top').slice(0, -2)) top: parseInt(card.css('top').slice(0, -2))
}, },
oldposition: { oldposition: {
@ -680,13 +681,10 @@ function adjustCard(offsets, doSync) {
} }
}; //use .css() instead of .position() because css' rotate }; //use .css() instead of .position() because css' rotate
//console.log(data); //console.log(data);
if (!doSync) if (!doSync) {
{
card.css('left', data.position.left); card.css('left', data.position.left);
card.css('top', data.position.top); card.css('top', data.position.top);
} } else {
else
{
//note that in this case, data.oldposition isn't accurate since //note that in this case, data.oldposition isn't accurate since
//many moves have happened since the last sync //many moves have happened since the last sync
//but that's okay becuase oldPosition isn't used right now //but that's okay becuase oldPosition isn't used right now