New features and bugfixes for Backface / TLFKAP

Since last week, I've had issues with draggables suddenly 'freezing' on the facebook canvas page, for no apprent reason.

This was tracked back to improper z-indexing for certain elements. So there.

I have also had a request out from a developer who wanted a special kind of snap-back, so that if a draggable is dropped anywhere on the canvas, it will snap back to its original position - unless it's dropped one a specific dropzone. That works now, like a clockwork :)

And the off-by-two, works on sundays, et.c. fetaures of the snapback are gone too. Now you can snap back relatively positioned elements with no worries.

The zip-file with the sample facebook application included (and a README!! Gosh!) is here; http://supercodex.com/backface/backface.zip

And if you just want to good around with the demo, you can find it here; http://apps.facebook.com/backface

No need to add or anything, just go there, no worries :)

Cheers,
PS

Comments

Dan Brown said…
Hi, i was wondering if you could help me with a small problem i'm having with this great library. What i'm looking to do is create a hidden input field when the item is dragged onto the drop zone. I've tried document.createElement but I'm not having much luck.
I'm storing what i want to be the value of the hidden field, in the ID of my divs, so i can print the value i want (moreorless) out using: document.getElementById('restrict').setTextValue(""+Drag.obj.getId()+"");

But after this i'm a bit stuck (i also noticed that it doesn't appear in the source code so maybe i'd need some kind of ajax request?)

Thanks for this great library :)
Dan
Script Uncle said…
Hi Dan,

You should be able to appendChild your newly created element to the form of your choice.

The view source option in browsers only display what was actually downloaded from the server, not anything that get modified or created thereafter.

I would recommend you to install firebug, and open its console, and then add console.log("...") statements to your code so that you can follow what happens and catch any errors that gets thrown.

Cheers,'PS
Dan Brown said…
Hey thanks for that :)
I actually have firebug but just never thought about that (doh!), so it might have been working all this time and i just figured it wasn't because i couldn't see it :)
I'll give this a go
Thanks for your help
Lili said…
Hi, does backface no longer work in facebook? Also the link to the library is broken. It seems to be a really useful library. Would like to still see it in action if possible.
Script Uncle said…
@lili: Yes, due to some recent changed to FBJS, Backface has borked. I haven't had the time to go over this. Hopefully I'll have some time over the weekends. I'll try to get the link up and running at least. Any help welcome :)

Cheers,
PS