hi guys we're doing a project wherein we have to write the code for the placement of flowchart elements. there is just one problem with the sorting of the elements.
ideally, it should look like this:
but right now it looks like this:
attached is the code. and the function that causes the boxes to sort wrong is this:
Code JavaScript:shiftDownElements: function(currentY){ this.elementsWithPositions.each(function(element){ var parallelProcess = this.getParallelElements(this._currentElement); var tempPos = {}; if (element.value.Y >= currentY) { debugger; tempPos.X = element.value.X; tempPos.Y = element.value.Y + this._flowchart.ELEMENTHEIGHT + this._flowchart.SPACEBTWELEMENT; this.elementsWithPositions.set(element.key, tempPos); } }, this); },
anyone help?


Reply With Quote
Bookmarks