(&mut self, domain_x: [f64; 2], domain_y: [f64; 2])
| 171 | } |
| 172 | |
| 173 | pub(super) fn set_domain(&mut self, domain_x: [f64; 2], domain_y: [f64; 2]) { |
| 174 | use serde_json::Map; |
| 175 | |
| 176 | let mut domain_obj = self |
| 177 | .data |
| 178 | .get_mut("domain") |
| 179 | .and_then(|d| d.as_object_mut()) |
| 180 | .cloned() |
| 181 | .unwrap_or_else(Map::new); |
| 182 | |
| 183 | domain_obj.insert("x".to_string(), json!(domain_x)); |
| 184 | domain_obj.insert("y".to_string(), json!(domain_y)); |
| 185 | |
| 186 | if let Some(obj) = self.data.as_object_mut() { |
| 187 | obj.insert("domain".to_string(), Value::Object(domain_obj)); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | pub(super) fn set_scene_reference(&mut self, scene: &str) { |
| 192 | if let Some(obj) = self.data.as_object_mut() { |
no outgoing calls
no test coverage detected