Forum > TAChart

tachart/tutorials/mandelbrot

(1/1)

kiyo:
I am using Windows version .
have compiled the following project:
C:/lazarus/components/tachart/tutorials/mandelbrot
however
Zoom with mouse left-drag does not work.
Please let me know the cause and solution.


wp:
Thanks for reporting. It seems that something broke it between v2.2.6 and v3.0.0...

[EDIT]
Found it - it was caused by some optimization more than two years ago. Is fixed in Laz/main and /fixes (i.e. will be included in v.4.2). If you want to fix your current version open file tagraph.pas from folder components/tachart of your Lazarus installation. Find the implementation of TChart.SetLogicalExtent. Insert "FOldClipRect := ZeroRect" before the line "FLogicalExtent := AValue"


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TChart.SetLogicalExtent(AValue: TDoubleRect);var  AllowChange: Boolean;  w, h: Double;begin  [...]  if FLogicalExtent = AValue then exit;  w := Abs(AValue.a.X - AValue.b.X);  h := Abs(AValue.a.Y - AValue.b.Y);  with ExtentSizeLimit do    if      UseXMin and (w < XMin) or UseXMax and (w > XMax) or      UseYMin and (h < YMin) or UseYMax and (h > YMax)    then      exit;  FOldClipRect := ZeroRect;  FLogicalExtent := AValue;  FIsZoomed := true;  StyleChanged(Self);end;
Then do the same in TChart.ZoomFull:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TChart.ZoomFull(AImmediateRecalc: Boolean);begin  if AImmediateRecalc then    FLogicalExtent := GetFullExtent;  if not FIsZoomed then exit;  FIsZoomed := false;  FOldClipRect := ZeroRect;  Invalidate;end;  

kiyo:
Thank you for your prompt response
I confirmed that the issue has been resolved in Lazarus 4.0.

Navigation

[0] Message Index

Go to full version