-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shape filter UI button #329
Add shape filter UI button #329
Conversation
This will contain properties that are common to all layers. Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
f5be7cc
to
03f6003
Compare
}; | ||
|
||
return ( | ||
<EuiPanel style={{ maxWidth: 300, border: 'hidden' }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we move the style to css file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
common/index.ts
Outdated
export enum FILTER_DRAW_MODE { | ||
NONE = 'none', | ||
POLYGON = 'polygon', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some words on what's the NONE and POLYGON mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack
This will add polygon button which provides context menu to select parameters like relation, label. Add cancel button if it starts drawing. Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
03f6003
to
19860e6
Compare
export enum FILTER_DRAW_MODE { | ||
NONE = 'none', // draw filter is inactive | ||
POLYGON = 'polygon', // Filter is active and set to draw polygon | ||
} | ||
|
||
export interface DrawFilterProperties { | ||
relation?: string; | ||
mode: FILTER_DRAW_MODE; | ||
filterLabel?: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about introduce a prop isDrawActive
, the mode only contains different type of draw.
enum FILTER_DRAW_MODE {
POLYGON = 'polygon', // Filter is active and set to draw polygon
CIRCLE='circle',
}
export interface DrawFilterProperties {
relation?: string;
isDrawActive: boolean
mode: FILTER_DRAW_MODE;
filterLabel?: string;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. Then we have to maintain two variable for 1 behavior. For ex: if draw is false, then i have to reset mode to null, similarly if we want to enable draw behavior, we have to set to true and set mode accordingly.
* Add spatial filter toolbar This will add polygon button which provides context menu to select parameters like relation, label. Add cancel button if it starts drawing. Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com> (cherry picked from commit 9fffd01)
Description
Add spatial filter toolbar with polygon button. This will just accept input and save it in map container.
Later DrawFilter Component will render draw polygon feature.
Issues Resolved
#213
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Screen.Recording.2023-03-07.at.2.48.42.PM.mov