Skip to content
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

[CircleGraph] Implement visqselector mode #1545

Merged
merged 1 commit into from
May 3, 2023

Conversation

stamalakhov
Copy link
Contributor

This commit implements visqselector mode and managing of scrollToSlected.

Its correctness is tested in #1543

Fresh draft: #1543
Full draft: #1505
Related: #1491

ONE-vscode-DCO-1.0-Signed-off-by: s.malakhov s.malakhov@partner.samsung.com

@stamalakhov stamalakhov self-assigned this Apr 28, 2023
/**
* @brief toggleSelect will select or toggle select with CtrlKey down
* @param viewNode view.Node instance
* @note works on host mode is viewMode.selector
*/
toggleSelect(viewNode) {
if (viewNode && this._host._mode === viewMode.selector) {
if (
Copy link
Contributor

@dayo09 dayo09 May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional) How about returning 'if not' condition here to reduce the level of condition?
Like,

if (!viewMode) {return}
if (this._host._mode === viewMode.selector || this._host._mode === viewMode.visqselector) {return}

// continuous logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dayo09
Thank you. Unfortunately there are 4 values, including visqselector, so inverting logic will still produce:

if (this._host._mode !== viewMode.viewer && this._host._mode !== viewMode.visq) {return}

// continuous logic

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, if it's not 'viewMode', then this function don't need to proceed. Note that it's an 'and' condition. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh. Sorry. I didn't immediately understand that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dayo09
fixed.

dayo09
dayo09 previously approved these changes May 2, 2023
seanshpark
seanshpark previously approved these changes May 2, 2023
Copy link
Contributor

@seanshpark seanshpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dayo09
dayo09 previously approved these changes May 2, 2023
Copy link
Contributor

@dayo09 dayo09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

dayo09
dayo09 previously approved these changes May 2, 2023
This commit implements visqselector mode and managing of scrollToSlected.

ONE-vscode-DCO-1.0-Signed-off-by: s.malakhov <s.malakhov@partner.samsung.com>
Copy link
Contributor

@seanshpark seanshpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seanshpark seanshpark merged commit 7d5e2eb into Samsung:main May 3, 2023
6 checks passed
@stamalakhov stamalakhov deleted the manual_MPQ_graph_med_br branch May 3, 2023 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants