We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello there! The project is really cool~
I want to make an issue
When multiple returns are written in the code, you need to determine if the code can be executed.
like this:
/** * Binary search * @param {Array} list * @param {Number} element * @returns {number} */ function indexSearch(list, element) { let currentIndex, currentElement, minIndex = 0, maxIndex = list.length - 1; while (minIndex <= maxIndex) { currentIndex = Math.floor((maxIndex + maxIndex) / 2); currentElement = list[currentIndex]; if (currentElement === element) { return currentIndex; } if (currentElement < element) { minIndex = currentIndex + 1; } if (currentElement > element) { maxIndex = currentIndex - 1; } } // Please pay attention to these two sentences return -1; return 0; }
There are two returns at the end of the code block. According to the actual situation, the last return will never be executed.
But in the flow chart, the effect is that the second one can still be executed.
Expectations: Ability to present special styles for code that can never be executed.
thanks!
The text was updated successfully, but these errors were encountered:
Hi @IceyTea, thanks for the reporting; you can use "custom modifiers" (see Readme, https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart#flow-tree-modifier, https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart#shapes-tree-editor) to do so (i.e. you need to define that rule when you use 'js-code-to-svg-flowchart') there is no native support right now. It's definitely doable, but unfortunately I don't have time now for adding more features to this project; if you are interested in contributing - I definitely will help&guide you so you can implement this feature. Thanks.
Sorry, something went wrong.
No branches or pull requests
Hello there! The project is really cool~
I want to make an issue
When multiple returns are written in the code, you need to determine if the code can be executed.
like this:
There are two returns at the end of the code block. According to the actual situation, the last return will never be executed.
But in the flow chart, the effect is that the second one can still be executed.
Expectations: Ability to present special styles for code that can never be executed.
thanks!
The text was updated successfully, but these errors were encountered: