mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-07 08:09:39 +02:00
Add comment
This commit is contained in:
@@ -210,11 +210,11 @@ export const draw = function (text, id, version, diagObj) {
|
|||||||
* @param w
|
* @param w
|
||||||
*/
|
*/
|
||||||
function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {
|
function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {
|
||||||
// Draw background rects covering the entire width of the graph, these form the section rows.
|
// Get unique task orders. Required to draw the background rects when compact flag is enabled.
|
||||||
|
|
||||||
const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
|
const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
|
||||||
const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));
|
const uniqueTasks = uniqueTaskOrderIds.map((id) => theArray.find((item) => item.order === id));
|
||||||
|
|
||||||
|
// Draw background rects covering the entire width of the graph, these form the section rows.
|
||||||
svg
|
svg
|
||||||
.append('g')
|
.append('g')
|
||||||
.selectAll('rect')
|
.selectAll('rect')
|
||||||
|
Reference in New Issue
Block a user