mirror of https://codeberg.org/topola/topola.git
Update to undoredo version 0.11
This commit is contained in:
parent
05108e964d
commit
299afde271
|
|
@ -13,7 +13,7 @@ derive_more = { version = "2.1", features = ["full"] }
|
|||
num-traits = "0.2"
|
||||
serde = { version = "1", features = ["derive", "rc"] }
|
||||
thiserror = "2.0"
|
||||
undoredo = { version = "0.10", features = ["derive", "bidimap", "stable-vec", "rstar"] }
|
||||
undoredo = { version = "0.11", features = ["derive", "bidimap", "stable-vec", "rstar"] }
|
||||
|
||||
[profile.release]
|
||||
opt-level = 2 # Fast and small WASM.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
use derive_getters::Getters;
|
||||
use derive_more::Constructor;
|
||||
use undoredo::DiscardDelta;
|
||||
use undoredo::ResetDelta;
|
||||
|
||||
use crate::{Board, LayerId, Vector2, selections::ComponentSelection};
|
||||
|
||||
|
|
@ -17,13 +17,13 @@ pub struct DragMoveInteractor {
|
|||
|
||||
impl DragMoveInteractor {
|
||||
pub fn hold(&mut self, board: &mut Board, pointer: Vector2<i64>) {
|
||||
board.discard_delta();
|
||||
board.reset_delta();
|
||||
|
||||
board.move_components_by(self.selection.clone(), pointer - self.origin);
|
||||
}
|
||||
|
||||
pub fn abort(&mut self, board: &mut Board) {
|
||||
board.discard_delta();
|
||||
board.reset_delta();
|
||||
}
|
||||
|
||||
pub fn release(&mut self, board: &mut Board, pointer: Vector2<i64>) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue