-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #36983 arguments of is_selected are flipped
- Loading branch information
1 parent
88cee00
commit e24612e
Showing
1 changed file
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,23 +1,25 @@ | |||
{ | { | ||
"name": "is_selected", | "name": "is_selected", | ||
"type": "function", | "type": "function", | ||
"description": "Returns if a feature is selected. If called with no parameters checks the current feature.", | "description": "Returns True if a feature is selected. Can be used with zero, one or two arguments, see below for details.", | ||
"arguments": [ | "variants": [ | ||
{ | { | ||
"arg":"feature", | "variant": "No parameters", | ||
"optional": true, | "variant_description": "If called with no parameters, the function will return true if the current feature in the current layer is selected.", | ||
"default": "current feature", | "arguments": [], | ||
"description":"The feature which should be checked for selection." | "examples": [ { "expression": "is_selected()", "returns" : "True if the current feature in the current layer is selected." } ] | ||
}, | }, | ||
{ | { | ||
"arg": "layer", | "variant": "One 'feature' parameter", | ||
"optional": true, | "variant_description": "If called with a 'feature' parameter only, the function returns true if the specified feature from the current layer is selected.", | ||
"default": "current layer", | "arguments": [ { "arg": "feature", "description": "The feature which should be checked for selection." } ], | ||
"description": "The layer (or its id or name) on which the selection will be checked." | "examples": [ { "expression": "is_selected(@atlas_feature)", "returns": "True if the current atlas feature is selected." } ] | ||
}, | |||
{ | |||
"variant" : "Two parameters", | |||
"variant_description": "If the function is called with both a layer and a feature, it will return true if the specified feature from the specified layer is selected.", | |||
"arguments": [ { "arg": "layer", "description": "The layer (or its ID or name) on which the selection will be checked." }, { "arg": "feature", "description": "The feature which should be checked for selection." } ], | |||
"examples": [ { "expression": "is_selected( 'streets', get_feature('streets', 'name', \"street_name\"))", "returns": "True if the current building's street is selected (assuming the building layer has a field named 'street_name' and the 'streets' layer has a field called 'name')." } ] | |||
} | } | ||
], | |||
"examples": [ | |||
{ "expression":"is_selected()", "returns" : "True if the current feature is selected."}, | |||
{ "expression":"is_selected(get_feature('streets', 'name', \"street_name\"), 'streets')", "returns":"True if the current building's street is selected."} | |||
] | ] | ||
} | } |