mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-24 22:34:09 +00: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:
@@ -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