mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-04 21:04:08 +00:00
parsing start
This commit is contained in:
@@ -2,7 +2,7 @@ use std::rc::Rc;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{stack::Stack, types::GPXFile};
|
||||
use crate::stack::Stack;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct Controller {
|
||||
@@ -18,10 +18,10 @@ impl Controller {
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn create_file(&mut self, name: &str) {
|
||||
let id = self.stack.get_new_file_id();
|
||||
let file = Rc::new(GPXFile::new(id, name));
|
||||
self.stack.update(&[file]);
|
||||
}
|
||||
// #[wasm_bindgen]
|
||||
// pub fn create_file(&mut self, name: &str) {
|
||||
// let id = self.stack.get_new_file_id();
|
||||
// let file = Rc::new(GPXFile::new(id, name));
|
||||
// self.stack.update(&[file]);
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user