UPDATE: Adds cell and formula editing (#92)
* UPDATE: Adds cell and formula editing * FIX: Do not loose focus when clicking on the formula we are editing * FIX: Minimal implementation of browse mode * FIX: Initial browse mode within sheets * UPDATE: Webapp Minimal Web Application
This commit is contained in:
committed by
GitHub
parent
53d3d5144c
commit
48719b6416
@@ -37,8 +37,8 @@ pub struct Model {
|
||||
#[wasm_bindgen]
|
||||
impl Model {
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new(locale: &str, timezone: &str) -> Result<Model, JsError> {
|
||||
let model = BaseModel::new_empty("workbook", locale, timezone).map_err(to_js_error)?;
|
||||
pub fn new(name: &str, locale: &str, timezone: &str) -> Result<Model, JsError> {
|
||||
let model = BaseModel::new_empty(name, locale, timezone).map_err(to_js_error)?;
|
||||
Ok(Model { model })
|
||||
}
|
||||
|
||||
@@ -482,4 +482,19 @@ impl Model {
|
||||
.map_err(|e| to_js_error(e.to_string()))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = "toBytes")]
|
||||
pub fn to_bytes(&self) -> Vec<u8> {
|
||||
self.model.to_bytes()
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = "getName")]
|
||||
pub fn get_name(&self) -> String {
|
||||
self.model.get_name()
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = "setName")]
|
||||
pub fn set_name(&mut self, name: &str) {
|
||||
self.model.set_name(name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user