moutard / SubZoom-Proto1

1 stars 1 forks source link

Time to load stories' stickers. #14

Closed moutard closed 12 years ago

moutard commented 12 years ago

Hi @fwouts, I don't know how to do that, but I think the first screen is a bit long to load stories' stickers. I Think there are two issues :

What do you think ?

fwouts commented 12 years ago

You're right. I think the database is taking a little time to proceed (a few seconds), but we could at least make the call to Cotton.DBSCAN2.getStories earlier in ui/world.js. Currently the call is made only after the sticky bar triggers the BackBone 'ready' event (once it is done appearing, see ui/sticky_bar/bar.js). I'm currently busy working on integrating a basic UI for stories, would you like to do it?

moutard commented 12 years ago

Thanks for this explanation ! I do it. Could you just explain me this equation in the file (sticker.js):

var iFinalPosition = (this._iPosition - iStickerCount / 2) * Cotton.UI.StickyBar.HORIZONTAL_SPACING + this._oBar.$().width() / 2;

fwouts commented 12 years ago

(this._iPosition - iStickerCount / 2) * Cotton.UI.StickyBar.HORIZONTAL_SPACING makes sure that the middle sticker is located exactly at 0.

this._oBar.$().width() / 2 translates everything so that the middle sticker is located exactly in the middle of the screen.

moutard commented 12 years ago

thanks.