mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 05:38:11 +08:00
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:
co-authored by
Dennis Kobert
parent
91543d530d
commit
790647815b
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user