Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 554 - KeepAspectRatio allows to have the mouse pointer at a different position to the edge of the ZoomRect, resulting in a strange zooming area
Summary: KeepAspectRatio allows to have the mouse pointer at a different position to t...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 131119
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 11:49 EST by yeray alonso
Modified: 2014-01-30 09:54 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
test project (100.07 KB, application/octet-stream)
2014-01-28 11:49 EST, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-01-28 11:49:15 EST
Created attachment 78 [details]
test project

With KeepAspectRatio=true, the ZoomRect being drawn tries to keep the aspect ratio of the original chart.
The zoom rectangle being drawn is always proportional. However, when you release the mouse button, the area zoomed in is the area from the mouse position, not the area the zoom rectangle is defining.
Note the top-left edge of the ZoomRect is always the mouse position where the MouseDown is made, but with KeepAspectRatio the bottom-right edge of the ZoomRect can be far below or far on the right side of the mouse position.

See the project attached and the images on it.
Comment 1 david berneda 2014-01-30 09:52:15 EST
Fixed. The problem was Chart MouseUp was forcing the ending zoom rectangle coordinates (X1,Y1) to be the mouse cursor position at mouseup.
Comment 2 david berneda 2014-01-30 09:54:08 EST
Also improved how is the zoom rectangle calculated when KeepAspectRatio=True.
Now it follows better the mouse cursor position, either at bottom or right side.