Ticket #230 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

graphic traffic events creator - only one dot remains white after 2nd click

Reported by: jdalbey Owned by: tanmay
Priority: High Milestone: May 2021 Training
Component: none Version:
Severity: Major Keywords:
Cc:

Description

What should happen is the first dot turns the legal dots to white, and the second click turns off unselected dots.

I noticed a few cases where the wrong results are produced. In the two cases below, for example, after the second click, only the initial dot remains white.

click1: 405 S 13.81 @BROOKHURST2
click2: 405 S 7.69  @MACARTHUR1

click1: 133 N 6.81  @LOCATION31
click2: 133 N 12.42 @S OF PORTOLA

I haven't tried to isolate this defect. Perhaps it is some anomaly with the highway data?

I also discovered an arithmetic error caused by using floating point arithmetic. Clicking the segment from 405 N 2.35 to 5.05 yields a distance of 2.69999999 when it should be 2.7. I will investigate this error and see if I can find a decimal arithmetic library that should fix it for us.

Change History

comment:1 Changed 6 years ago by jdalbey

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r556.

Luckily, no library is necessary, javascript has a toFixed() function that returns a string of a rounded version of the floating pt number.

Note: See TracTickets for help on using tickets.