Refactor ViewportPosition from u32 (UVec2) to f64 (DVec2) (#345)

* Refactor ViewportPosition from u32 (UVec2) to f64 (DVec2)

* Fix pseudo_hash call

* Replace hash function with proper function for uuid generation

* Cargo fmt

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Keavon Chambers
2021-08-14 02:45:24 -07:00
committed by GitHub
co-authored by Dennis Kobert
parent 91543d530d
commit 790647815b
20 changed files with 128 additions and 75 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ pub struct Resize {
}
impl Resize {
pub fn calculate_transform(&self, center: Key, lock_ratio: Key, ipp: &InputPreprocessor) -> Option<Message> {
let mut start = self.drag_start.as_f64();
let stop = ipp.mouse.position.as_f64();
let mut start = self.drag_start;
let stop = ipp.mouse.position;
let mut size = stop - start;
if ipp.keyboard.get(lock_ratio as usize) {