Version 11 (modified by dido, 16 years ago) (diff) |
---|
Analysis
Overview
Update the frame rotation user interface to support dragging of a halo to rotate the frame. Remove the discreet rotation buttons from the halo menu and remove the hud. Rotation will be around the topLeft corner of the frame for this task revision.
Task requirements
- Reduce the rotation halo menu to one button
- Change the icon of the halo rotation button to indicate it can be dragged
- Rotate around the topLeft corner of the frame (ie 0,0, so later when the coordinates change, the rotation works as expected)
- Rotation center, halo button and mouse should be on the same line, when the user drags the halo button.
- in the diagram below the dark rectangle represents single frame, the gray one is the hallo button. And the rotation point is the one that the frame is rotates around. The rotation point will stay consistent no meter the rotation of the frame.
- The halo button won't be rotated.
- Make sure the halo button moves with the frame. Currently halos lay out around the unrotated bounding box enclosing the rotated frame
- Position the halo button at the bottom right corner of the frame, along a vector that extends from the top left corner to the bottom right, offset from the outside of the frame by 15,15 pixels (hard coded, changeable)
- When multiple frames are selected
- The initial position of the halo button is equal by degrees to the first selected frame. (If for example the first selected frame has rotation 45 degree then the halo button is moved 45 degrees from the center of the selection rectangle)
- The rotation point is at the top left corner.
- Again during dragging the rotation point, the halo button and the mouse are on the same line.
- The initial position of the halo button is equal by degrees to the first selected frame. (If for example the first selected frame has rotation 45 degree then the halo button is moved 45 degrees from the center of the selection rectangle)
Task result
The result of this task is code
Implementation idea
- Model the dragging after the frame move halo button pattern
Related
How to demo
- Run the application
- Create a new book
- Insert frame and rotate it
- Insert few more frames and try to rotate them
Design
- Define class FrameRotateButton:
public class FrameRotateButton extends MoveHaloButton { private static void defineSkin(ElementSkinPart part); public Prop<FrameRotateHaloMenu> parent(); protected MouseCapture captureClick(MouseEvent e); protected boolean computeVisible(); public Prop<PageWorkArea> workArea(); }
- Update FrameRotateHaloMenu
FrameRotateHaloMenu currently defines it's location as the topRIght of the selection bounds, but that is no longer valid. It should define
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
Rotating Selection
We need to think about what rotation means for 3 selected frames, where does the halo go, where doe the rotation center, on the temporary group or on each frame, each rotating potentially differently (one topLeft, one center, one bottomRight?) I checked out pages, and while they do not have an onscreen rotation widget (it is in a palette), it sets the rotation of each object, thus if you select 3 boxes, which rotate on center, then change the rotation, they all spin at the same time, and are set to the same rotation. If we are to do this, we likely will need a non-rectangular selection, which will take more time, and then the effect on the other halo menus is in question - sriggins
Halo Button Positioning
Should the *center* of the halo button be centered on the vector? Something like:
Future Revisions
Put the discreet rotation buttons into the hud. Change the halo menu button to show the halo hud if single clicked. -sriggins
Attachments
- vector_centered_halo.png (15.6 KB) - added by sriggins 16 years ago.
- rotationR1.png (49.6 KB) - added by dido 16 years ago.
- rotationMultiR1.png (56.9 KB) - added by dido 16 years ago.