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
@@ -58,7 +58,7 @@ impl Fsm for RectangleToolFsmState {
fn transition(
self,
event: ToolMessage,
document: &DocumentMessageHandler,
_document: &DocumentMessageHandler,
tool_data: &DocumentToolData,
data: &mut Self::ToolData,
input: &InputPreprocessor,
@@ -72,7 +72,7 @@ impl Fsm for RectangleToolFsmState {
(Ready, DragStart) => {
shape_data.drag_start = input.mouse.position;
responses.push_back(DocumentMessage::StartTransaction.into());
shape_data.path = Some(vec![generate_hash(&*responses, input, document.document.hash())]);
shape_data.path = Some(vec![generate_uuid()]);
responses.push_back(DocumentMessage::DeselectAllLayers.into());
responses.push_back(