Add Brush tool warning; move font list loading to document creation time

This commit is contained in:
Keavon Chambers 2024-11-09 12:27:09 -08:00
parent 457619794b
commit de366f9514
13 changed files with 99 additions and 82 deletions

View file

@ -442,13 +442,12 @@ impl EditorHandle {
/// A font has been downloaded
#[wasm_bindgen(js_name = onFontLoad)]
pub fn on_font_load(&self, font_family: String, font_style: String, preview_url: String, data: Vec<u8>, is_default: bool) -> Result<(), JsValue> {
pub fn on_font_load(&self, font_family: String, font_style: String, preview_url: String, data: Vec<u8>) -> Result<(), JsValue> {
let message = PortfolioMessage::FontLoaded {
font_family,
font_style,
preview_url,
data,
is_default,
};
self.dispatch(message);