You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a form designer
I want to specify the color and width of lines in selectable lines and polygons
So that data collectors can more easily select the correct one
Note: in the future, we will likely introduce a rule-based way to assign colors based on other property values. This is a simple short-term solution that is useful in many contexts.
Stroke color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name stroke
And that the value is valid based on the criteria below
When I open the select from map question
Then the line segments for that option should all be the specified color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name stroke
And that the value is invalid based on the criteria below
When I open the select from map question
Then the line segments for that option should all be the default color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has no value set for a property with name stroke
When I open the select from map question
Then the line segments for that option should all be the default color
Stroke width
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name stroke-width
And that the value is a floating point number greater than or equal to 0
When I open the select from map question
Then the line segments for that option should all have the specified stroke width in dp
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name stroke-width
And that the value is NOT a floating point number greater than or equal to 0
When I open the select from map question
Then the line segments for that option should all have the default stroke width
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has no value set for a property with name stroke-width
When I open the select from map question
Then the line segments for that option should all have the default stroke width
Fill
Given that I have a form definition with a select from map
And that a choice that is a polygon has a value set for a property with name fill
And that the value is valid based on the criteria below
When I open the select from map question
Then the polygon for that option should be filled with the specified color and default opacity
Given that I have a form definition with a select from map
And that a choice that is a polygon has a value set for a property with name fill
And that the value is invalid based on the criteria below
When I open the select from map question
Then the polygon for that option should be filled with the default color and default opacity
Given that I have a form definition with a select from map
And that a choice that is a polygon has NO value set for a property with name fill
When I open the select from map question
Then the polygon for that option should be filled with the default color and default opacity
Color rules
// Colors can be in short form:
// "#ace"
// or long form
// "#aaccee"
// with or without the # prefix.
// Colors are interpreted the same as in CSS,
// in #RRGGBB and #RGB order.
// But other color formats or named colors
// are not supported
The text was updated successfully, but these errors were encountered:
lognaturel
changed the title
Add support for styling lines in Select One from Map questions
Add support for styling lines and shapes in Select One from Map questions
Apr 2, 2024
As a form designer
I want to specify the color and width of lines in selectable lines and polygons
So that data collectors can more easily select the correct one
Forum thread · Issue for markers · Simple style spec
Note: in the future, we will likely introduce a rule-based way to assign colors based on other property values. This is a simple short-term solution that is useful in many contexts.
Stroke color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name
stroke
And that the value is valid based on the criteria below
When I open the select from map question
Then the line segments for that option should all be the specified color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name
stroke
And that the value is invalid based on the criteria below
When I open the select from map question
Then the line segments for that option should all be the default color
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has no value set for a property with name
stroke
When I open the select from map question
Then the line segments for that option should all be the default color
Stroke width
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name
stroke-width
And that the value is a floating point number greater than or equal to 0
When I open the select from map question
Then the line segments for that option should all have the specified stroke width in dp
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has a value set for a property with name
stroke-width
And that the value is NOT a floating point number greater than or equal to 0
When I open the select from map question
Then the line segments for that option should all have the default stroke width
Given that I have a form definition with a select from map
And that a choice that is either a line or a polygon has no value set for a property with name
stroke-width
When I open the select from map question
Then the line segments for that option should all have the default stroke width
Fill
Given that I have a form definition with a select from map
And that a choice that is a polygon has a value set for a property with name
fill
And that the value is valid based on the criteria below
When I open the select from map question
Then the polygon for that option should be filled with the specified color and default opacity
Given that I have a form definition with a select from map
And that a choice that is a polygon has a value set for a property with name
fill
And that the value is invalid based on the criteria below
When I open the select from map question
Then the polygon for that option should be filled with the default color and default opacity
Given that I have a form definition with a select from map
And that a choice that is a polygon has NO value set for a property with name
fill
When I open the select from map question
Then the polygon for that option should be filled with the default color and default opacity
Color rules
The text was updated successfully, but these errors were encountered: