moutard / SubZoom-Proto1

1 stars 1 forks source link

Provide data for the topbar #8

Closed fwouts closed 12 years ago

fwouts commented 12 years ago

Hey @moutard,

In order to have a first usable version of the topbar, we need to display the various stickers on top with real data. Could you write some code to create an array that would contain the data for each sticker? For now I guess we only need a story id in order to link it with the rest of the UI (image and title are less urgent). I don't know how to do that properly using your code :)

Please output the array in the JS console, I will then move it where I think it should be (unless you want to adapt the UI code and integrate it yourself, which would be even better!).

Thanks!

moutard commented 12 years ago

Hey @fwouts That's why I wanted to extend the class "store" for stories and visitItems. For instance we can extend the prototype to add a function that return what you want. But for the moment I will make a simple function.

moutard commented 12 years ago

@fwouts You can use this function in the file dbscan2/dbscanUser.js Cotton.DBSCAN2.getStories(mCallBack)

By the way this function is called after dbscan2. l.38. So every here you can send data to the UI.

Sorry the code is a bit crappy, but it's a bit late here. And I had a big day. But with that you can move on.

fwouts commented 12 years ago

Thanks so much, I'll try it out today :)

fwouts commented 12 years ago

The code does almost exactly what I want, but there seems to be a bug: the visit items seem to be the same in every story. Do you know why it would do that?

moutard commented 12 years ago

Fixed. c70d19c2ff3490ff1ed8571dc9a79bfd8fdad08d

fwouts commented 12 years ago

Thanks!