SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    0 Post(s)
    0 Thread(s)

    prototype: help on computing the placement of flowchart elements

    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){
    			var parallelProcess = this.getParallelElements(this._currentElement);
    			var tempPos = {};
    				if (element.value.Y >= currentY) {
    						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?
    Attached Images Attached Images
    Attached Files Attached Files


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts