mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 19:34:12 +01:00
Fill Area: tool.setOption accepts the Shape Builder options it shares
main now checks every option tool.setOption gets against the tool before setting any, and a tool without its own check rejects every option. The Fill Area tool now checks its options with check_builder_options, as the Shape Builder does, so gapDetection, gapLength and openFilledAsClosed are accepted again and other keys or bad values are still errors.
This commit is contained in:
1 parent
d5a69ce493
commit
735de46552
1 file changed
+3
@@ -552,4 +552,7 @@ impl Tool for FillAreaTool {
|
||||
}
|
||||
self.hover = None;
|
||||
}
|
||||
fn check_option(&self, key: &str, v: &Value) -> Result<(), String> {
|
||||
check_builder_options(self.id(), &serde_json::Map::from_iter([(key.to_string(), v.clone())]))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user