Skip to content

Commit

Permalink
Make animation module only available in Wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Jan 27, 2025
1 parent 2753103 commit b8f9b8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
pub mod alignment;
#[cfg(not(target_arch = "wasm32"))]
pub mod animation;
pub mod border;
pub mod clipboard;
Expand Down
13 changes: 9 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,20 +498,25 @@ pub mod window;
pub mod advanced;

pub use crate::core::alignment;
pub use crate::core::animation;
pub use crate::core::border;
pub use crate::core::color;
pub use crate::core::gradient;
pub use crate::core::padding;
pub use crate::core::theme;
pub use crate::core::{
Alignment, Animation, Background, Border, Color, ContentFit, Degrees,
Gradient, Length, Padding, Pixels, Point, Radians, Rectangle, Rotation,
Settings, Shadow, Size, Theme, Transformation, Vector,
Alignment, Background, Border, Color, ContentFit, Degrees, Gradient,
Length, Padding, Pixels, Point, Radians, Rectangle, Rotation, Settings,
Shadow, Size, Theme, Transformation, Vector,
};
pub use crate::runtime::exit;
pub use iced_futures::Subscription;

#[cfg(not(target_arch = "wasm32"))]
pub use crate::core::animation;

#[cfg(not(target_arch = "wasm32"))]
pub use crate::core::Animation;

pub use alignment::Horizontal::{Left, Right};
pub use alignment::Vertical::{Bottom, Top};
pub use Alignment::Center;
Expand Down

0 comments on commit b8f9b8b

Please sign in to comment.