Fix viewport tilt/zoom while snapping to show snapped values (#663)
This commit is contained in:
parent
c4dc999a38
commit
d4539bc304
|
|
@ -611,7 +611,7 @@ impl DocumentMessageHandler {
|
|||
})),
|
||||
WidgetHolder::new(Widget::NumberInput(NumberInput {
|
||||
unit: "°".into(),
|
||||
value: Some(self.movement_handler.tilt / (std::f64::consts::PI / 180.)),
|
||||
value: Some(self.movement_handler.snapped_angle() / (std::f64::consts::PI / 180.)),
|
||||
increment_factor: 15.,
|
||||
on_update: WidgetCallback::new(|number_input: &NumberInput| {
|
||||
MovementMessage::SetCanvasRotation {
|
||||
|
|
@ -652,7 +652,7 @@ impl DocumentMessageHandler {
|
|||
})),
|
||||
WidgetHolder::new(Widget::NumberInput(NumberInput {
|
||||
unit: "%".into(),
|
||||
value: Some(self.movement_handler.zoom * 100.),
|
||||
value: Some(self.movement_handler.snapped_scale() * 100.),
|
||||
min: Some(0.000001),
|
||||
max: Some(1000000.),
|
||||
on_update: WidgetCallback::new(|number_input: &NumberInput| {
|
||||
|
|
|
|||
Loading…
Reference in New Issue