mirror of
https://github.com/storytold/cadcraft.git
synced 2026-11-09 20:10:12 -06:00
Fix imports after merging upstream/main
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use cadcraft_geom::Mat3;
|
||||
|
||||
use super::common::Handle;
|
||||
use super::{Color, Deserialize, Serialize, Vec2, Vec3, standard, yes};
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use crate::DisplayOnly;
|
||||
|
||||
use super::{
|
||||
Arc, Bounds2, Drag, Drawing, EngineError, Entity, Handle, Input, PendingWindow, Prompt, Result, Running, Session, Snapshot, Step, Value, Vec2,
|
||||
assoc, cmd, find_command, guard, pointmod, select, snap, sysvars,
|
||||
|
||||
@@ -316,7 +316,7 @@ pub use pipeline::{Options, build, build_entities, build_plot};
|
||||
use props::{default_lineweight, resolve_common};
|
||||
use text_entity::text_style;
|
||||
pub use text_entity::{layout_mtext_entity, place_text_entity, text_align};
|
||||
pub use viewports::{viewport_clip, viewport_content};
|
||||
pub use viewports::{clip_list, viewport_clip, viewport_content};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
@@ -304,7 +304,11 @@ fn handle_scroll_zoom(app: &mut CadApp, ui: &mut egui::Ui, nav: &Navigation<'_>,
|
||||
&& let Ok(st) = app.session.state_mut()
|
||||
{
|
||||
let view = st.view();
|
||||
st.set_view_quiet(cadcraft_engine::View { center: view.center - nav.xf.screen_delta_to_world(p.scroll), height: view.height, twist: view.twist });
|
||||
st.set_view_quiet(cadcraft_engine::View {
|
||||
center: view.center - nav.xf.screen_delta_to_world(p.scroll),
|
||||
height: view.height,
|
||||
twist: view.twist,
|
||||
});
|
||||
}
|
||||
let opts = ui.ctx().options(|o| o.input_options);
|
||||
let wheel = ui.input(|i| wheel_zoom_points(&i.raw.events, &opts, nav.rect.height()));
|
||||
@@ -339,7 +343,11 @@ fn handle_button_navigation(app: &mut CadApp, nav: &Navigation<'_>, inside: bool
|
||||
let delta = at - last;
|
||||
if let Ok(st) = app.session.state_mut() {
|
||||
let view = st.view();
|
||||
st.set_view_quiet(cadcraft_engine::View { center: view.center - nav.xf.screen_delta_to_world(delta), height: view.height, twist: view.twist });
|
||||
st.set_view_quiet(cadcraft_engine::View {
|
||||
center: view.center - nav.xf.screen_delta_to_world(delta),
|
||||
height: view.height,
|
||||
twist: view.twist,
|
||||
});
|
||||
}
|
||||
}
|
||||
app.canvas.pan_last = Some(at);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::list::preview_options;
|
||||
use super::{Bounds2, CanvasState, Color32, DisplayList, Handle, Kind, ListKey, Pos2, Rect, Rgb, Shape, Stroke, Vec2, Xf, vec2};
|
||||
use super::{Bounds2, CanvasState, Color32, DisplayList, Handle, Kind, ListKey, Mat3, Pos2, Rect, Rgb, Shape, Stroke, Vec2, Xf, vec2};
|
||||
|
||||
fn color32(c: Rgb) -> Color32 {
|
||||
Color32::from_rgb(c.0, c.1, c.2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::{Bounds2, CadApp, Shape, Stroke, Tokens, Vec2, Xf, pos2};
|
||||
use super::{Bounds2, CadApp, Shape, Stroke, Tokens, Vec2, Xf};
|
||||
|
||||
/// Grid spacing adapted to the zoom: multiply the unit until lines are at least `min_px` apart.
|
||||
fn adaptive(unit: f64, scale: f64, min_px: f64) -> f64 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::viewport::{split_viewport, stencil_clip};
|
||||
use super::{Bounds2, CadApp, DisplayList, Handle, ListKey, Rgb, Tokens, Xf, rebuild, same_content};
|
||||
use super::{Bounds2, CadApp, DisplayList, Handle, ListKey, Rgb, Tokens, Vec2, Xf, rebuild, same_content};
|
||||
|
||||
/// Primitives of `list` sorted by entity handle, built on the first highlight after each list
|
||||
/// rebuild. Highlighting the hovered entity used to scan every primitive on every frame: ~2.5 ms
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::draw::draw_list;
|
||||
use super::{Bounds2, CadApp, DisplayList, Handle, Kind, Rect, Rgb, Vec2, Xf};
|
||||
use super::{Bounds2, CadApp, DisplayList, Handle, Kind, Mat3, Rect, Rgb, Vec2, Xf};
|
||||
|
||||
/// The active MSPACE viewport when its contents are drawn apart from the layout's list (see
|
||||
/// [`VpContent`]), with its clip outline when it is clipped. A clipped viewport is clipped with
|
||||
|
||||
Reference in New Issue
Block a user