?

Log in

No account? Create an account
Fun with mouse gestures in javascript - brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Fun with mouse gestures in javascript [Oct. 16th, 2005|05:02 pm]
Brad Fitzpatrick
[Tags|, ]

Rotate the goats using mouse gestures and watch them dance:

http://bradfitz.com/hacks/gestures/

I'm starting to feel confident in JavaScript (the language), and my JavaSript-the-client-environment is getting better.
LinkReply

Comments:
[User Picture]From: kunzite1
2005-10-17 12:12 am (UTC)

next thing to work on would be to make it so it will actually rotate them further than 90 degrees based upon the distance traveled by the mouse.
if that's possible of course.
(Reply) (Thread)
[User Picture]From: brad
2005-10-17 12:21 am (UTC)
That's not a common use case so I think it'd only lead to more accidents.

FYI, this will be used as another way to let people rotate their pictures in Fotobilder/Scrapbook. A surprising number of modern digital cameras (an uh, all analog cameras) don't have orientation sensors.

I was just having to rotate a couple hundred pictures for a friend who sent me a photo CD without EXIF data and got a little annoyed. :-)
(Reply) (Parent) (Thread)
[User Picture]From: kunzite1
2005-10-17 12:24 am (UTC)

not a common use case? very true.

new fb rotating stuff? awesome. the current interface with the buttons works but this would be quicker for the user.

and yeah, that would have taken quite some time. always good to figure out new ways to make the computer do the work for you.
unfortunately, the person has to come up with what the computer has to do first. XD
(Reply) (Parent) (Thread)
[User Picture]From: mpnolan
2005-10-17 12:53 am (UTC)
Awesome. I love it when software is designed around how things should work rather than around how things are typically done.
(Reply) (Parent) (Thread)
[User Picture]From: muerte
2005-10-17 01:36 am (UTC)
Heh. It was anilnaik wasn't it :)
(Reply) (Parent) (Thread)
[User Picture]From: taral
2005-10-17 06:25 am (UTC)
What's wrong with rotation buttons?
(Reply) (Parent) (Thread)
[User Picture]From: brad
2005-10-17 04:27 pm (UTC)
Nothing. We'll have rotation buttons.
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]From: brad
2005-10-17 12:19 am (UTC)
I noticed that too. Let's call it an easter egg bonus feature.
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]From: brad
2005-10-17 01:00 am (UTC)
I only have Safari 1.3.1 (v312.3.1) at home, where it seems fine. So I assume you're talking about Safari 2?
(Reply) (Parent) (Thread)
[User Picture]From: jgrafton
2005-10-17 04:39 am (UTC)
Alternatively, you can cheat and make them dance even when they aren't straight (and thus make them dance fast easier, too).
(Reply) (Parent) (Thread)
[User Picture]From: mart
2005-10-17 09:12 am (UTC)

While that's neat, I can't help but think it would be more intuitive just to have "rotate left" and "rotate right" buttons. I'm not too hot at making little circular motions with my mouse because it's not a motion I do very often.

(Reply) (Thread)
[User Picture]From: brad
2005-10-17 04:27 pm (UTC)
There will still be rotation buttons. This is just another way.
(Reply) (Parent) (Thread)
[User Picture]From: cjcollier
2005-10-18 05:50 am (UTC)
you're pretty cool, brad
(Reply) (Thread)