Reduce use of global variables in skin dose map JavaScript; improve JavaScript objects

Issue #414 resolved
David Platten created an issue

Some of the skin dose map JavaScript functions rely on certain global variables being set. It would be better to pass these data to the functions as a parameter.

The methods within the JavaScript objects use this a great deal, referring to properties of the object. Pycharm Doesn't like this, and would prefer some clarification in the code. See http://javascriptplayground.com/blog/2012/04/javascript-variable-scope-this/

Comments (10)

  1. David Platten reporter

    Updated skin dose map JavaScript code to reduce use of global variables in functions and also clarify use of this in objects. Pycharm is much happier with my code now. References issue #414

    → <<cset 271ca0134358>>

  2. David Platten reporter

    Forgot to upload the updated rffiltered.html file with the previous commit. Updated skin dose map JavaScript code to reduce use of global variables in functions and also clarify use of this in objects. Pycharm is much happier with my code now. References issue #414

    → <<cset c4882d4f7a5d>>

  3. David Platten reporter

    Updated some skin dose map JavaScript to use jQuery rather than the document model. Added a few bits of documentation. Components that could have been affected by the changes have all been verified as still working. References issue #414

    → <<cset a101bc2017ae>>

  4. Ed McDonagh

    Is this a work in progress @dplatten? In order to release, I'm going to bump to 0.8 to tie it in with the skin dose maps issue #61. I hope that's the right thing to do!

  5. Log in to comment