This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 104718 - API: Support for zoom in current cursor position
Summary: API: Support for zoom in current cursor position
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Graph (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 105060
  Show dependency tree
 
Reported: 2007-05-24 12:11 UTC by Sergey Petrov
Modified: 2007-06-05 09:49 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch (10.88 KB, patch)
2007-05-28 15:40 UTC, David Kaspar
Details | Diff
Second Patch (11.05 KB, patch)
2007-05-29 08:56 UTC, David Kaspar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2007-05-24 12:11:57 UTC
I see only too zoom actions now, with top-left orientation and with center
orientation, In my opinion it's good to zoom using current mouse position as
center point.
Comment 1 David Kaspar 2007-05-28 15:39:26 UTC
ActionFactory.createMouseCenteredZoomAction method added. Also
test.zoom.MouseCenteredZoomTest example added.
Comment 2 David Kaspar 2007-05-28 15:40:06 UTC
Created attachment 42861 [details]
Patch
Comment 3 Sergey Petrov 2007-05-28 18:22:27 UTC
Sorry, it was my mistake about center point, it really should be mouse position
oriented but not centered, what I mean: point of scene below mouse should stay
below mouse position while zooming (if possible).

Suggested realization  sometimes works good, but try next use case:
1. zoom in to get scroll bars
2. scroll to right-bottom side of scene
3. move mouse pointer to left-top side of visible area
4. scroll wheel up-down a bit several times
zoom will not be changed but scene will be scrolled to mouse position, you can
even scroll to top-left side of the scene this way
Comment 4 David Kaspar 2007-05-29 08:56:16 UTC
My fault the previous behavior does not make much sense.
Attaching a new patch with mouse-oriented behavior.
Comment 5 David Kaspar 2007-05-29 08:56:48 UTC
Created attachment 42876 [details]
Second Patch
Comment 6 Sergey Petrov 2007-05-30 15:38:50 UTC
seems working in most cases,
-except some border effects caused by scene handling when zoom out (i.e. view
area don't show empty space behind "busy" area) - feature
-and strange shift when: zoom in, move to right-bottom edge, zoom out, scene
jumps from border, may be base reason the same as in first item, but In my
opinion it's a bug
Comment 7 David Kaspar 2007-06-05 09:49:36 UTC
Fixed in main trunk. Version 2.3.