PathFinding.js icon indicating copy to clipboard operation
PathFinding.js copied to clipboard

Fixed Values Throws Error

Open Kawinesh opened this issue 11 years ago • 3 comments

When ever i want to fix the values of the row and column then it behave like crap.Start and end blocks are not able to be moved and some blocks cant be blocked this happens for all the blocks below 360th column.

Things i have altered in view.js nodeSize: 10, // width and height of a single node, in pixel init: function(opts) { this.numCols = 32; this.numRows = 48; this.paper = Raphael('draw_area'); this.$stats = $('#stats'); },

in controller.js

setDefaultStartEndPos: function() { var width, height, marginRight, availWidth, centerX, centerY, endX, endY, nodeSize = View.nodeSize;

    width  = 320;
    height = 800;

    marginRight = $('#algorithm_panel').width();
   // availWidth = width - marginRight;

    centerX = Math.ceil(width / 2 / nodeSize);
    centerY = Math.floor(height / 2 / nodeSize);

    this.setStartPos(centerX - 5, centerY);
    console.log(centerX+"/"+centerY);
    this.setEndPos(centerX + 5, centerY);
},

errorissue

Kawinesh avatar Nov 14 '14 09:11 Kawinesh

Hi,

I'm not sure what you are trying to do. Can you please tell me what you want to achieve? Maybe there is some better way.

imor avatar Nov 15 '14 14:11 imor

Hi, I have tried to fix a map at the background which i was able to achieve. For that i want to have the column,row and their size fixed which while trying to achieve i faced these problems.

Kawinesh avatar Nov 17 '14 04:11 Kawinesh

Fixed a very similar bug in 3257762875e936878fd0be62198b58fd1eb99646. @Kawinesh can you please check if this was indeed your bug.

imor avatar Dec 15 '14 12:12 imor