Bug #4621 » 0001-Eliminate-unnecessary-interactive-chart-updates.patch
src/Wt/Chart/WAxis | ||
---|---|---|
double mapToDevice(double value, int segment = 0) const;
|
||
long long getDateNumber(Wt::WDateTime dt) const;
|
||
void setZoomFromClient(double zoom);
|
||
void setPanFromClient(double pan);
|
||
friend class WCartesianChart;
|
||
friend class WCartesian3DChart;
|
src/Wt/Chart/WAxis.C | ||
---|---|---|
zoomDirty_ = true;
|
||
}
|
||
void WAxis::setZoomFromClient(double zoom)
|
||
{
|
||
zoom_ = zoom;
|
||
}
|
||
double WAxis::zoom() const
|
||
{
|
||
return zoom_;
|
||
... | ... | |
void WAxis::setPan(double pan)
|
||
{
|
||
set(pan_, pan);
|
||
zoomDirty_ = true;
|
||
panDirty_ = true;
|
||
}
|
||
void WAxis::setPanFromClient(double pan)
|
||
{
|
||
pan_ = pan;
|
||
}
|
||
double WAxis::pan() const
|
src/Wt/Chart/WCartesianChart.C | ||
---|---|---|
if (!axis(XAxis).zoomDirty_) {
|
||
double z = xTransformHandle_.value().m11();
|
||
if (z != axis(XAxis).zoom()) axis(XAxis).setZoom(z);
|
||
if (z != axis(XAxis).zoom()) axis(XAxis).setZoomFromClient(z);
|
||
}
|
||
if (!axis(Y1Axis).zoomDirty_) {
|
||
double z = yTransformHandle_.value().m22();
|
||
if (z != axis(Y1Axis).zoom()) axis(Y1Axis).setZoom(z);
|
||
if (z != axis(Y1Axis).zoom()) axis(Y1Axis).setZoomFromClient(z);
|
||
}
|
||
WPointF devicePan =
|
||
WPointF(xTransformHandle_.value().dx() / xTransformHandle_.value().m11(),
|
||
... | ... | |
axis(Y1Axis).mapFromDevice(-devicePan.y()));
|
||
if (!axis(XAxis).panDirty_) {
|
||
double x = modelPan.x();
|
||
if (x != axis(XAxis).pan()) axis(XAxis).setPan(x);
|
||
if (x != axis(XAxis).pan()) axis(XAxis).setPanFromClient(x);
|
||
}
|
||
if (!axis(Y1Axis).panDirty_) {
|
||
double y = modelPan.y();
|
||
if (y != axis(Y1Axis).pan()) axis(Y1Axis).setPan(y);
|
||
if (y != axis(Y1Axis).pan()) axis(Y1Axis).setPanFromClient(y);
|
||
}
|
||
}
|
||
- « Previous
- 1
- 2
- Next »