08-07-2008, 02:19 PM
I noticed while zooming with the mousewheel, it either goes too deep or too far away.
To solve this issue, I butchered the ZoomControl, and made the following modifications:
private function onMouseWheel(event:MouseEvent) : void
{
var dw:Number = event.delta;
var dz:Number = dw < 0 ? 0.975 : 1.025;
Transforms.zoomBy(_object, dz);
}
it checks whether the event delta is positive or negative, then assigns dz according to that. one improvement could be based on delta substract or add it to one multiplied with a constant.
PrecisePanZoomControl is attached.
Best to all.
To solve this issue, I butchered the ZoomControl, and made the following modifications:
private function onMouseWheel(event:MouseEvent) : void
{
var dw:Number = event.delta;
var dz:Number = dw < 0 ? 0.975 : 1.025;
Transforms.zoomBy(_object, dz);
}
it checks whether the event delta is positive or negative, then assigns dz according to that. one improvement could be based on delta substract or add it to one multiplied with a constant.
PrecisePanZoomControl is attached.
Best to all.