Upgrade your web design
3232Design is a Minneapolis web design studio offering affordable high-quality communication design specializing in websites and interactive media; also producing and integrating business systems, print marketing, online marketing and brand identity design for creative professionals and small to medium-sized businesses.
Call or email today for a free consultation.
October 22, 2013 at 10:13 am
Circular rotation in Javascript
- Mobile-responsive tables March 19, 2014 at 2:39 pm
- Contenteditable text editor in a web browser October 22, 2013 at 5:55 pm
- HTML CSS3 3D Panorama viewer with accelerometer and compass in the stock October 22, 2013 at 12:35 pm
- Circular rotation in Javascript October 22, 2013 at 10:13 am
- How to stroke text in Illustrator: A tutorial July 21, 2013 at 11:20 pm
- How I saved a client $60,000 (or, Where To Tap) July 21, 2013 at 9:21 pm
- How much does a website cost? July 21, 2013 at 8:21 pm
- Use htaccess to rewrite URLs with query strings July 21, 2013 at 7:22 pm
- Ian Tregillis web site July 21, 2013 at 3:04 pm
- Web design as an art form July 21, 2013 at 2:59 pm
My original doohickey in the upper-right corner of my pages was a Flash interface for my portfolio. It doesn't do anything now, so if you have any ideas for it please let me know in the comments!
For those of you looking for the code to do it, the relevant nugget is this:
rad = dir * Math.atan2(obj.data('_y') - _ymouse, obj.data('_x') - _xmouse)What this means is, take the x and y coordinates of the center of the thing we've clicked on and subtract them from the page coordinates, then take the atan of those x,y coordinates, which will return the angle represented by those coordinates in radians. Then use CSS3 to rotate your image by that much. That's it!
Doesn't it sound like I know what I'm talking about?
Comments