Menu

#2379 Negative height in TreeNav

v4.1.6
open
nobody
None
5
2008-11-29
2008-11-29
Jon48
No

Hi,
While trying to debug an error which make my browser crashed, I found that the function which determine vertical lines size in the Interactive Tree do not verify a condition of positive numbers.

In file treenav.js, line 129 (function sizeLines), the present code is :
vlines[i].style.height = (y2-y1)+'px';
without never verifying if y2 is higher than y1.

In my case, this happens for one of my lines, so the height is a negative number... It seemed to be the cause of my problem, since my browser do not crash any more after adding a test of comparison (it is purely an empiric conclusion, but it works...).

On the same line, I have another thought : I have also values of y2 which are not entire numbers (and so are the differences y2-y1). It doesn't seem to be a problem for JS, but I'm not sure this can be a correct value in strict HTML/CSS standards.

Thanks!
Jonathan
Sorry for my frenchy english !...

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.