473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Looking for Suggestions - UI Device for Rotation

Hey all,

Im trying to design something that would be intuitive for the user to
represent rotating something. Think along the lines of rotating an
image a specific amount of degrees. The obvious choice is to have the
user input CW or CCW and the number of degrees but i would rather
present something graphically and let them manipulate that, then in JS
determine the rotation.

The only thing i have been able to come up with right now is something
along the lines of the iPod click wheel with a dot at the top. As it is
clicked and dragged it spins, but the problem is i dont know if this is
possible in just JS / HTML, i don't want to use flash.

So any ideas? or do you think this click wheel idea could work?

Apr 18 '06 #1
8 1460


jo**********@gmail.com wrote:
The only thing i have been able to come up with right now is something
along the lines of the iPod click wheel with a dot at the top. As it is
clicked and dragged it spins, but the problem is i dont know if this is
possible in just JS / HTML, i don't want to use flash.


I don't know how the iPod click wheel looks but I think if it uses Flash
then you could try to solve it with SVG in browsers like Firefox 1.5 or
SeaMonkey 1.0 or the upcoming Opera 9. With IE/Win you can use the Adobe
SVG viewer to have SVG support. I don't think you will be able to have a
spinning wheel where you can control/check rotation with HTML and
JavaScript alone.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 18 '06 #2
hmm.. bummer.

I really dont want to use any external plug ins. If the browser doesnt
support it nativley i dont want to use it.

Apr 18 '06 #3

Areric wrote:
hmm.. bummer.

I really dont want to use any external plug ins. If the browser doesnt
support it nativley i dont want to use it.


Well logically you could do it, though you need to make alot of images
(could be solved by Server Side Scripting) and just load them in order,
or whatever...

Won't be pretty though.

Apr 18 '06 #4


Areric wrote:
If the browser doesnt
support it nativley i dont want to use it.


Firefox 1.5 has native support for SVG and scripting. Opera 9 will have
that too. But admittedly that is not much if you are looking for a
solution for web users in general.
Recent Safari and Firefox 1.5 also have support for the canvas element
into which JavaScript can draw
<http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 18 '06 #5
Martin Honnen wrote:
Recent Safari and Firefox 1.5 also have support for the canvas element
into which JavaScript can draw
<http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas>


I opened <url: http://caimansys.com/painter/ > with IE 6 and I was able
to draw on the canvas. I'm stumped. I didn't think that IE supported the
CANVAS tag so why does it work in IE?

Andrew Poulos
Apr 18 '06 #6


Andrew Poulos wrote:
I opened <url: http://caimansys.com/painter/ > with IE 6 and I was able
to draw on the canvas. I'm stumped. I didn't think that IE supported the
CANVAS tag so why does it work in IE?


That page includes this <http://caimansys.com/painter/excanvas.js> which
seems to be an attempt to emulate canvas and its 2d context for IE/Win
based on the VML vector markup language that browser supports.

Various attempts to do that are there, see
<http://erik.eae.net/archives/2006/03/28/12.05.59/>

--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 18 '06 #7
Martin Honnen wrote:
I don't think you
will be able to have a spinning wheel where you can control/check
rotation with HTML and JavaScript alone.


Sure you could. Imagine two images: A big wheel and a small dot.

The small dot is absolutely positioned, by default at the top of the wheel
image, on top of it.
On click and drag of the mouse over the big wheel image, the position of the
small dot is re-calculated using basic trigonometry so that its position on
the wheel is re-calculated and it is moved. When the mouse button is
released, its new position is returned.

There are plenty of clocks and other animation scripts out there that do
similar things. I did a quick search and couldn't find an example of a
"knob" like this though, which I find surprising. I'm sure it exists.
Perhaps someone else can do some better searching ;)

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Apr 18 '06 #8
You know Matt i was thinking about that and didnt know if it would work
but now that you mention it you could use CSS to position it and then
basically put the "dot" image on a "rail" so to speak, only allow it to
move a certain way. In the background i calculate the degrees it moved
and store it hidden.

I might go with that.

Apr 18 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: M. Clift | last post by:
Hi All, Could someone help me out with this? items = ('a', 'b', 'c', 'd') items + 1 = ( 'b', 'c', 'd', 'a') items + 2 = ( 'c', 'd', 'a', 'b') items + 3 = ( 'd', 'a', 'b', 'c') trans = 1
27
by: Aurangzeb M. Agha | last post by:
I'm running Postgres 7.1.3, and just started having a problem where my dynamic site is going down (read-only DB, with no writes happening to the DB) regularly (every other day). I have no idea...
0
by: Lunchtimemama | last post by:
I'm looking to disable Windows autoplay for a particular device. There's a registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\CancelAutoplay\CLSID)...
5
by: Russell Warren | last post by:
Does anyone have an easier/faster/better way of popping from the middle of a deque than this? class mydeque(deque): def popmiddle(self, pos): self.rotate(-pos) ret = self.popleft()...
0
by: VorTechS | last post by:
I'm having a problem with an inherited label, applying text rotation to aligned text. If text rotation is applied to the aligned text, the alignment goes 'nuts'. I can find no logic to what is...
2
by: Roger Li | last post by:
I got a problem about the mean rotation calculation. I have a group of rotation matrics in my program and I want to calculate the mean rotation on the basis of these rotation matrics. I think it...
6
by: Ramtin Kazemi | last post by:
Hi How can i perform bitwise rotation in C#?
6
by: elrondrules | last post by:
I want to create a simple log rotation for the following scenario: I have a script that when executed will write debug and error messages to a specific file (say script.log). I want to create...
8
by: infoseekar | last post by:
Image Resize & Rotation Hi I have 2 scripts, one for Image rotation and other image resize and they both are working. Image resize scripts load the picture and resize it and Image rotation...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.