wyantb / HashMask

A browser addon for password fields, adding a visual hash to aid in memorability.
5 stars 0 forks source link

Get carousel to zoom to the right image when one is clicked #14

Closed nickserv closed 12 years ago

nickserv commented 12 years ago

For now, clicking any image just unhides the carousel, and it shows whatever slide it was on before (though it's still animating in the background).

I should be able to get this to work with .carousel(number).

wyantb commented 12 years ago

This is working, isn't it?

nickserv commented 12 years ago

As of right now, yes. However, there's a bug, which is why I'm still leaving this open. While next and prev work perfectly and the appropriate images DO open when you click on different links, clicking on one of the image links opens the image in such a way that it displays the image but also displays another. In other words, when you open an image link, the old image doesn't go away while the new one does otherwise display properly. I'll look into this more in the next couple of days.

wyantb commented 12 years ago

Oh cool, that is fun isn't it.

nickserv commented 12 years ago

Actually, I think I just noticed the issue. The function that shows the image is separate from what's showing the modal, while the image display function first hides the old image and then shows the new one. If it's not timed right (it's not), the old image will be hidden before the modal is displayed. However, the old image is already hidden via inheritance from the modal being hidden, so nothing will happen to the old image. The modal will then show, and since the old image was hidden when it was already hidden, it will be displayed with the modal and nothing will undo this. The image display function still shows the new image, though, resulting in both images being displayed (or more than two if you click more than two image links).

nickserv commented 12 years ago

Want me to fix this?

wyantb commented 12 years ago

You are not allowed to fix things. Only I, the master of all that is this universe, am allowed to make changes. All other unholy ones must stay clear from my repository.

(Read: yes, please do).

nickserv commented 12 years ago

This is getting to be trickier than I expected. I tried messing with the order of things with animations. Then, I realized that I should postpone the code in showExample() until the modal is actually opened, so we're not trying to hide or show things that are already hidden. I rewrote the example links so they would run showExample() directly via JavaScript, and then modified showExample so it would first show the modal (if it was not already displayed), wait until it's done animating, and then show the proper example as we were doing before. However, the left and right buttons broke, and I kept having more issues with multiple examples being displayed at once. For example, I would open an example, close it, open another, and it would be fine. Though if I repeated then again, it would start displaying multiple at once. I scrapped this code since it kinda left us with more problems than we already had. Do you want me to attempt this again, and maybe you could help me debug it?

wyantb commented 12 years ago

Uh..yes? I guess my default behavior is to nuke it from orbit, just always popup with image 0. But if you grab me sometime, I could probably offer constructive help, yes.

nickserv commented 12 years ago

I'm going to try doing this again with animations disabled, as they making timing code like this a lot trickier. If it works, I might be able to add animations back in.

I might be able to do this on my own, but if you want to meet me in the SSE lab today, I can stay here till about 6:00-6:30 if need be (I'm there now).

wyantb commented 12 years ago

Can't do it today, studying & senior project. If you're around some other day I'll help; I don't feel a need to distribute/promote this immediately.

nickserv commented 12 years ago

Ah, alright. I'll be around for our meeting tomorrow. Is it okay if I don't finish all my issues by tomorrow then? I can definitely work on them more today, though I have other things to do and I might need help and/or more time with this stuff.

wyantb commented 12 years ago

Sure, no worries. I'll swing by early to work on this, since Momentum is going to have a crash session @ 4PM.

wyantb commented 12 years ago

Stole & completed.