Fix scoped semantic drafts and dependent review controls
This commit is contained in:
@@ -42,7 +42,7 @@ pub(super) fn variants(
|
||||
_value: &Value,
|
||||
) -> Option<Vec<(String, Value)>> {
|
||||
if path.ends_with("/Port/contract") {
|
||||
let current = draft.materialize().unwrap_or_else(|_| draft.value.clone());
|
||||
let current = draft.context_value();
|
||||
let sa = current.pointer("/body/Sa").is_some();
|
||||
if !sa {
|
||||
return Some(vec![]);
|
||||
@@ -80,7 +80,7 @@ pub(super) fn variants(
|
||||
);
|
||||
}
|
||||
if path.ends_with("/Port/contract/Component/orientation") {
|
||||
let current = draft.materialize().unwrap_or_else(|_| draft.value.clone());
|
||||
let current = draft.context_value();
|
||||
let kind_path = path.strip_suffix("orientation").unwrap().to_owned() + "kind";
|
||||
let orientations: &[&str] =
|
||||
if current.pointer(&kind_path).and_then(Value::as_str) == Some("Standard") {
|
||||
|
||||
Reference in New Issue
Block a user