mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update euclid, azure, skia, offscreen_gl_context, plane-split, webrender
This commit is contained in:
parent
76270ad6c1
commit
e17697fb0e
47 changed files with 196 additions and 211 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use euclid::{TypedPoint2D, TypedVector2D};
|
||||
use euclid::ScaleFactor;
|
||||
use euclid::TypedScale;
|
||||
use script_traits::{EventResult, TouchId};
|
||||
use self::TouchState::*;
|
||||
use style_traits::DevicePixel;
|
||||
|
@ -124,7 +124,7 @@ impl TouchHandler {
|
|||
let (d1, c1) = self.pinch_distance_and_center();
|
||||
|
||||
let magnification = d1 / d0;
|
||||
let scroll_delta = c1 - c0 * ScaleFactor::new(magnification);
|
||||
let scroll_delta = c1 - c0 * TypedScale::new(magnification);
|
||||
|
||||
TouchAction::Zoom(magnification, scroll_delta)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue