ela 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +5 -0
  3. data/.gitlab-ci.yml +23 -0
  4. data/Gemfile +7 -0
  5. data/Gemfile.lock +139 -0
  6. data/Guardfile +25 -0
  7. data/LICENSE.txt +205 -0
  8. data/README.de.md +195 -0
  9. data/README.md +66 -0
  10. data/Rakefile +96 -0
  11. data/app/css/screen.styl +425 -0
  12. data/app/css/vendor/stackedit.styl +140 -0
  13. data/app/fonts/Roboto-Italic-webfont.eot +0 -0
  14. data/app/fonts/Roboto-Italic-webfont.svg +642 -0
  15. data/app/fonts/Roboto-Italic-webfont.ttf +0 -0
  16. data/app/fonts/Roboto-Italic-webfont.woff +0 -0
  17. data/app/fonts/Roboto-Light-webfont.eot +0 -0
  18. data/app/fonts/Roboto-Light-webfont.svg +641 -0
  19. data/app/fonts/Roboto-Light-webfont.ttf +0 -0
  20. data/app/fonts/Roboto-Light-webfont.woff +0 -0
  21. data/app/fonts/Roboto-LightItalic-webfont.eot +0 -0
  22. data/app/fonts/Roboto-LightItalic-webfont.svg +641 -0
  23. data/app/fonts/Roboto-LightItalic-webfont.ttf +0 -0
  24. data/app/fonts/Roboto-LightItalic-webfont.woff +0 -0
  25. data/app/fonts/Roboto-Medium-webfont.eot +0 -0
  26. data/app/fonts/Roboto-Medium-webfont.svg +593 -0
  27. data/app/fonts/Roboto-Medium-webfont.ttf +0 -0
  28. data/app/fonts/Roboto-Medium-webfont.woff +0 -0
  29. data/app/fonts/Roboto-MediumItalic-webfont.eot +0 -0
  30. data/app/fonts/Roboto-MediumItalic-webfont.svg +642 -0
  31. data/app/fonts/Roboto-MediumItalic-webfont.ttf +0 -0
  32. data/app/fonts/Roboto-MediumItalic-webfont.woff +0 -0
  33. data/app/fonts/Roboto-Regular-webfont.eot +0 -0
  34. data/app/fonts/Roboto-Regular-webfont.svg +621 -0
  35. data/app/fonts/Roboto-Regular-webfont.ttf +0 -0
  36. data/app/fonts/Roboto-Regular-webfont.woff +0 -0
  37. data/app/fonts/Roboto-Thin-webfont.eot +0 -0
  38. data/app/fonts/Roboto-Thin-webfont.svg +631 -0
  39. data/app/fonts/Roboto-Thin-webfont.ttf +0 -0
  40. data/app/fonts/Roboto-Thin-webfont.woff +0 -0
  41. data/app/fonts/Roboto-ThinItalic-webfont.eot +0 -0
  42. data/app/fonts/Roboto-ThinItalic-webfont.svg +631 -0
  43. data/app/fonts/Roboto-ThinItalic-webfont.ttf +0 -0
  44. data/app/fonts/Roboto-ThinItalic-webfont.woff +0 -0
  45. data/app/fonts/droid_sans_regular.typeface.svg +1 -0
  46. data/app/fonts/fontawesome-webfont.eot +0 -0
  47. data/app/fonts/fontawesome-webfont.svg +2671 -0
  48. data/app/fonts/fontawesome-webfont.ttf +0 -0
  49. data/app/fonts/fontawesome-webfont.woff +0 -0
  50. data/app/fonts/fontawesome-webfont.woff2 +0 -0
  51. data/app/js/lib/application.coffee +83 -0
  52. data/app/js/lib/bootstrap_data.coffee +70 -0
  53. data/app/js/lib/collections/00_limited_collection.coffee +85 -0
  54. data/app/js/lib/collections/curves.coffee +3 -0
  55. data/app/js/lib/collections/named_object_collection.coffee +7 -0
  56. data/app/js/lib/mathjaxConfig.coffee +241 -0
  57. data/app/js/lib/models/app.coffee +58 -0
  58. data/app/js/lib/models/base_app.coffee +62 -0
  59. data/app/js/lib/models/base_app_model.coffee +61 -0
  60. data/app/js/lib/models/base_calculator.coffee +212 -0
  61. data/app/js/lib/models/base_subapp_container.coffee +35 -0
  62. data/app/js/lib/models/curve.coffee +179 -0
  63. data/app/js/lib/router.coffee +26 -0
  64. data/app/js/lib/views/app.coffee +56 -0
  65. data/app/js/lib/views/base_app.coffee +274 -0
  66. data/app/js/lib/views/base_aside.coffee +9 -0
  67. data/app/js/lib/views/base_graph.coffee +477 -0
  68. data/app/js/lib/views/base_subapp_container.coffee +44 -0
  69. data/app/js/lib/views/canvas.coffee +73 -0
  70. data/app/js/lib/views/curve_graph.coffee +163 -0
  71. data/app/js/lib/views/curves_aside.coffee +21 -0
  72. data/app/js/lib/views/curves_list_item.coffee +8 -0
  73. data/app/js/lib/views/grouped_parameters_aside.coffee +14 -0
  74. data/app/js/lib/views/headup.coffee +15 -0
  75. data/app/js/lib/views/help.coffee +86 -0
  76. data/app/js/lib/views/interpolated_graph.coffee +281 -0
  77. data/app/js/lib/views/legend.coffee +138 -0
  78. data/app/js/lib/views/legend_handler.coffee +51 -0
  79. data/app/js/lib/views/overview.coffee +85 -0
  80. data/app/js/lib/views/overview_tile.coffee +18 -0
  81. data/app/js/lib/views/parameters_aside.coffee +12 -0
  82. data/app/js/lib/views/three_graph.coffee +92 -0
  83. data/app/js/vendor/Markdown.Converter.js +1519 -0
  84. data/app/js/vendor/Markdown.Extra.js +874 -0
  85. data/app/js/vendor/Markdown.Toc.coffee +79 -0
  86. data/app/js/vendor/backbone-1.3.3.min.js +2 -0
  87. data/app/js/vendor/backbone-validation-0.11.5.js +8 -0
  88. data/app/js/vendor/backbone.poised/form.coffee +156 -0
  89. data/app/js/vendor/backbone.poised/form/anchor.coffee +26 -0
  90. data/app/js/vendor/backbone.poised/form/base_control.coffee +42 -0
  91. data/app/js/vendor/backbone.poised/form/linked_control.coffee +79 -0
  92. data/app/js/vendor/backbone.poised/form/linked_number_control.coffee +27 -0
  93. data/app/js/vendor/backbone.poised/form/linked_range_control.coffee +53 -0
  94. data/app/js/vendor/backbone.poised/form/linked_select_control.coffee +18 -0
  95. data/app/js/vendor/backbone.poised/form/linked_string_control.coffee +27 -0
  96. data/app/js/vendor/backbone.poised/form/number_control.coffee +25 -0
  97. data/app/js/vendor/backbone.poised/form/range_control.coffee +48 -0
  98. data/app/js/vendor/backbone.poised/form/select_control.coffee +16 -0
  99. data/app/js/vendor/backbone.poised/form/selectbox.coffee +78 -0
  100. data/app/js/vendor/backbone.poised/form/slider.coffee +109 -0
  101. data/app/js/vendor/backbone.poised/form/string_control.coffee +23 -0
  102. data/app/js/vendor/backbone.poised/form/submit_control.coffee +39 -0
  103. data/app/js/vendor/backbone.poised/form/textarea.coffee +36 -0
  104. data/app/js/vendor/backbone.poised/form/textfield.coffee +86 -0
  105. data/app/js/vendor/backbone.poised/form/value.coffee +33 -0
  106. data/app/js/vendor/backbone.poised/form/value_control.coffee +15 -0
  107. data/app/js/vendor/backbone.poised/linked_form.coffee +43 -0
  108. data/app/js/vendor/backbone.poised/list.coffee +97 -0
  109. data/app/js/vendor/backbone.poised/list/add_button.coffee +16 -0
  110. data/app/js/vendor/backbone.poised/list/anchor.coffee +32 -0
  111. data/app/js/vendor/backbone.poised/list/item.coffee +68 -0
  112. data/app/js/vendor/backbone.poised/list/searchfield.coffee +26 -0
  113. data/app/js/vendor/backbone.poised/list/selectable_item.coffee +65 -0
  114. data/app/js/vendor/backbone.poised/patches.coffee +6 -0
  115. data/app/js/vendor/backbone.poised/string_mixin.coffee +23 -0
  116. data/app/js/vendor/backbone.poised/underscore_ext.coffee +2 -0
  117. data/app/js/vendor/backbone.poised/view.coffee +59 -0
  118. data/app/js/vendor/gaussianElimination.coffee +40 -0
  119. data/app/js/vendor/hammer-2.0.8.min.js +7 -0
  120. data/app/js/vendor/jquery-3.1.1.min.js +4 -0
  121. data/app/js/vendor/jquery.after-transition.coffee +20 -0
  122. data/app/js/vendor/jquery.backbone-hammer.coffee +28 -0
  123. data/app/js/vendor/jquery.keyboard-modifiers.coffee +22 -0
  124. data/app/js/vendor/jquery.mark-5.2.3.min.js +7 -0
  125. data/app/js/vendor/jquery.scrollTo-2.1.2.min.js +7 -0
  126. data/app/js/vendor/js-yaml-3.4.3.min.js +3 -0
  127. data/app/js/vendor/markup_text.coffee +95 -0
  128. data/app/js/vendor/mathjax/MathJax.js +19 -0
  129. data/app/js/vendor/mathjax/extensions/MathEvents.js +19 -0
  130. data/app/js/vendor/mathjax/extensions/tex2jax.js +19 -0
  131. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot +0 -0
  132. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot +0 -0
  133. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot +0 -0
  134. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot +0 -0
  135. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot +0 -0
  136. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot +0 -0
  137. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot +0 -0
  138. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot +0 -0
  139. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot +0 -0
  140. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot +0 -0
  141. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot +0 -0
  142. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot +0 -0
  143. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot +0 -0
  144. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot +0 -0
  145. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot +0 -0
  146. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot +0 -0
  147. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot +0 -0
  148. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot +0 -0
  149. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot +0 -0
  150. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot +0 -0
  151. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/eot/MathJax_WinIE6-Regular.eot +0 -0
  152. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf +0 -0
  153. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf +0 -0
  154. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf +0 -0
  155. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf +0 -0
  156. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf +0 -0
  157. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf +0 -0
  158. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf +0 -0
  159. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf +0 -0
  160. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf +0 -0
  161. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf +0 -0
  162. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf +0 -0
  163. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf +0 -0
  164. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf +0 -0
  165. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf +0 -0
  166. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf +0 -0
  167. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf +0 -0
  168. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf +0 -0
  169. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf +0 -0
  170. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf +0 -0
  171. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf +0 -0
  172. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_WinChrome-Regular.otf +0 -0
  173. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/otf/MathJax_WinIE6-Regular.otf +0 -0
  174. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_AMS-Regular.svg +765 -0
  175. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Bold.svg +136 -0
  176. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Caligraphic-Regular.svg +134 -0
  177. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Bold.svg +319 -0
  178. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Fraktur-Regular.svg +309 -0
  179. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Bold.svg +656 -0
  180. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Italic.svg +374 -0
  181. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Main-Regular.svg +659 -0
  182. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Math-BoldItalic.svg +331 -0
  183. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Italic.svg +331 -0
  184. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Math-Regular.svg +330 -0
  185. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Bold.svg +280 -0
  186. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Italic.svg +245 -0
  187. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_SansSerif-Regular.svg +211 -0
  188. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Script-Regular.svg +160 -0
  189. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Size1-Regular.svg +110 -0
  190. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Size2-Regular.svg +109 -0
  191. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Size3-Regular.svg +49 -0
  192. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Size4-Regular.svg +102 -0
  193. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_Typewriter-Regular.svg +322 -0
  194. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/svg/MathJax_WinChrome-Regular.svg +39 -0
  195. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff +0 -0
  196. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff +0 -0
  197. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff +0 -0
  198. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff +0 -0
  199. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff +0 -0
  200. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff +0 -0
  201. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff +0 -0
  202. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff +0 -0
  203. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff +0 -0
  204. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff +0 -0
  205. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff +0 -0
  206. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff +0 -0
  207. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff +0 -0
  208. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff +0 -0
  209. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff +0 -0
  210. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff +0 -0
  211. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff +0 -0
  212. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff +0 -0
  213. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff +0 -0
  214. data/app/js/vendor/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff +0 -0
  215. data/app/js/vendor/mathjax/jax/element/mml/jax.js +19 -0
  216. data/app/js/vendor/mathjax/jax/element/mml/optable/Arrows.js +19 -0
  217. data/app/js/vendor/mathjax/jax/element/mml/optable/BasicLatin.js +19 -0
  218. data/app/js/vendor/mathjax/jax/element/mml/optable/CombDiacritMarks.js +19 -0
  219. data/app/js/vendor/mathjax/jax/element/mml/optable/CombDiactForSymbols.js +19 -0
  220. data/app/js/vendor/mathjax/jax/element/mml/optable/Dingbats.js +19 -0
  221. data/app/js/vendor/mathjax/jax/element/mml/optable/GeneralPunctuation.js +19 -0
  222. data/app/js/vendor/mathjax/jax/element/mml/optable/GeometricShapes.js +19 -0
  223. data/app/js/vendor/mathjax/jax/element/mml/optable/GreekAndCoptic.js +19 -0
  224. data/app/js/vendor/mathjax/jax/element/mml/optable/Latin1Supplement.js +19 -0
  225. data/app/js/vendor/mathjax/jax/element/mml/optable/LetterlikeSymbols.js +19 -0
  226. data/app/js/vendor/mathjax/jax/element/mml/optable/MathOperators.js +19 -0
  227. data/app/js/vendor/mathjax/jax/element/mml/optable/MiscMathSymbolsA.js +19 -0
  228. data/app/js/vendor/mathjax/jax/element/mml/optable/MiscMathSymbolsB.js +19 -0
  229. data/app/js/vendor/mathjax/jax/element/mml/optable/MiscSymbolsAndArrows.js +19 -0
  230. data/app/js/vendor/mathjax/jax/element/mml/optable/MiscTechnical.js +19 -0
  231. data/app/js/vendor/mathjax/jax/element/mml/optable/SpacingModLetters.js +19 -0
  232. data/app/js/vendor/mathjax/jax/element/mml/optable/SuppMathOperators.js +19 -0
  233. data/app/js/vendor/mathjax/jax/element/mml/optable/SupplementalArrowsA.js +19 -0
  234. data/app/js/vendor/mathjax/jax/element/mml/optable/SupplementalArrowsB.js +19 -0
  235. data/app/js/vendor/mathjax/jax/input/TeX/config.js +19 -0
  236. data/app/js/vendor/mathjax/jax/input/TeX/jax.js +19 -0
  237. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js +19 -0
  238. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/maction.js +19 -0
  239. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/menclose.js +19 -0
  240. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/mglyph.js +19 -0
  241. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js +19 -0
  242. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/ms.js +19 -0
  243. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/mtable.js +19 -0
  244. data/app/js/vendor/mathjax/jax/output/CommonHTML/autoload/multiline.js +19 -0
  245. data/app/js/vendor/mathjax/jax/output/CommonHTML/config.js +19 -0
  246. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js +19 -0
  247. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js +19 -0
  248. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js +19 -0
  249. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js +19 -0
  250. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js +19 -0
  251. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js +19 -0
  252. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js +19 -0
  253. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js +19 -0
  254. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js +19 -0
  255. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js +19 -0
  256. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js +19 -0
  257. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js +19 -0
  258. data/app/js/vendor/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js +19 -0
  259. data/app/js/vendor/mathjax/jax/output/CommonHTML/jax.js +19 -0
  260. data/app/js/vendor/modernizr-custom-3.3.1.min.js +3 -0
  261. data/app/js/vendor/persistjs-git.js +1136 -0
  262. data/app/js/vendor/poised/poised.general.coffee +21 -0
  263. data/app/js/vendor/poised/poised.tabs.coffee +31 -0
  264. data/app/js/vendor/poised/utils.coffee +11 -0
  265. data/app/js/vendor/request_animation_frame.coffee +19 -0
  266. data/app/js/vendor/three-82.min.js +15 -0
  267. data/app/js/vendor/three-CanvasRenderer-82.js +1118 -0
  268. data/app/js/vendor/three-Projector-82.js +929 -0
  269. data/app/js/vendor/underscore-1.8.3.min.js +6 -0
  270. data/app/js/vendor/webfontloader-1.6.26.min.js +33 -0
  271. data/app/views/aliasing/legend.jst.hamlc +6 -0
  272. data/app/views/composites/composites_list_item_label.jst.hamlc +3 -0
  273. data/app/views/composites/import_composites_aside.jst.hamlc +6 -0
  274. data/app/views/composites/mix_preset_list_item_label.jst.hamlc +8 -0
  275. data/app/views/composites/share_aside.jst.hamlc +7 -0
  276. data/app/views/doc/airplanes_list_item_label.jst.hamlc +3 -0
  277. data/app/views/doc/import_airplanes_aside.jst.hamlc +6 -0
  278. data/app/views/doc/share_aside.jst.hamlc +7 -0
  279. data/app/views/general/app.jst.hamlc +42 -0
  280. data/app/views/general/curves_list_item_label.jst.hamlc +5 -0
  281. data/app/views/general/help.jst.hamlc +7 -0
  282. data/app/views/general/tabs.jst.hamlc +6 -0
  283. data/app/views/index.haml +24 -0
  284. data/app/views/overview/app.jst.hamlc +7 -0
  285. data/app/views/overview/tile.jst.hamlc +4 -0
  286. data/bin/console +14 -0
  287. data/bin/setup +8 -0
  288. data/ela.gemspec +50 -0
  289. data/exe/ela +59 -0
  290. data/lib/ela.rb +8 -0
  291. data/lib/ela/jasmine.rb +87 -0
  292. data/lib/ela/server.rb +136 -0
  293. data/lib/ela/utils.rb +131 -0
  294. data/lib/ela/version.rb +3 -0
  295. data/package-lock.json +899 -0
  296. data/package.json +11 -0
  297. data/support/project/Guardfile +64 -0
  298. data/support/project/jasmine.yml +3 -0
  299. data/support/server.ru +5 -0
  300. metadata +4365 -0
@@ -0,0 +1,58 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.App extends Backbone.Model
3
+ helpText: 'about'
4
+
5
+ defaults:
6
+ path: null
7
+ params: null
8
+ showAbout: false
9
+
10
+ initialize: ->
11
+ @on('change:path', @handlePath)
12
+ @on('change:params', @handleParams)
13
+
14
+ # @returns BaseApp or BaseSubappContainer
15
+ currentAppModel: ->
16
+ @get('currentAppModel')
17
+
18
+ # @returns BaseApp
19
+ currentApp: ->
20
+ @currentAppModel()?.currentApp()
21
+
22
+ currentNamespace: ->
23
+ path = @get('path')
24
+ if path?
25
+ klass = path[0].toCapitalCamel()
26
+ ELA[klass]
27
+
28
+ handlePath: (model, path) ->
29
+ if path?
30
+ if path[0] is 'about'
31
+ @set(showAbout: true)
32
+ else if path[0] isnt @currentAppModel()?.name
33
+ AppClass = @currentNamespace().Models.App
34
+ @set
35
+ showAbout: false
36
+ currentAppModel: new AppClass(path: path.slice(1))
37
+ else
38
+ @currentAppModel()?.set(path: path.slice(1))
39
+ @set(showAbout: false)
40
+ else
41
+ @set
42
+ currentAppModel: null
43
+ showAbout: false
44
+
45
+ handleParams: (model, params) ->
46
+ @currentApp().deserialize(params) if params?
47
+
48
+ url: ->
49
+ url = location.origin
50
+ if json = @toJSON()
51
+ url += '/#app/' +
52
+ @get('path').join('/') +
53
+ '?' +
54
+ encodeURI(json)
55
+ url
56
+
57
+ toJSON: ->
58
+ JSON.stringify(currentApp.serialize()) if currentApp = @currentApp()
@@ -0,0 +1,62 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.BaseApp extends ELA.Models.BaseAppModel
3
+ hasHelpText: true
4
+
5
+ initialize: (options = {}) ->
6
+ @parentApp = options.parentApp
7
+
8
+ @on 'change:path', @handlePath
9
+ @set currentAside: @get('currentAside') or null
10
+ @handlePath()
11
+
12
+ handlePath: =>
13
+ path = @get('path')?[0]
14
+ if path is 'help'
15
+ @set showHelp: true
16
+ else
17
+ @set showHelp: false
18
+
19
+ helpTextName: =>
20
+ @path.replace('/', '_')
21
+
22
+ # Initialize the curves attribute with all necessary options.
23
+ #
24
+ # @param [Array] curves curves to add to the curves collection
25
+ # @param [Object] options reached through to collection initialization
26
+ initCurves: (curves, options = {}) ->
27
+ @curves = new ELA.Collections.Curves(curves, options)
28
+
29
+ currentApp: -> this
30
+
31
+ serialize: ->
32
+ v = parameters: _.pick(
33
+ @attributes
34
+ _.keys(@defaults())
35
+ )
36
+ if @curves?
37
+ v.selectedCurves = for curve in @curves.getHistory()
38
+ curve.get('function')
39
+ if @displayParams?
40
+ v.displayParams = @displayParams.serialize()
41
+ if @get('axisLabelingForCurve')?
42
+ v.axisLabelingForCurve = @get('axisLabelingForCurve').get('function')
43
+ v
44
+
45
+ deserialize: (params) ->
46
+ @set(params.parameters)
47
+
48
+ for curve in @curves.models
49
+ curve.set(selected: false)
50
+
51
+ for curve in @curves.models
52
+ curveFunction = curve.get('function')
53
+ if _.contains(params.selectedCurves, curveFunction)
54
+ curve.set(selected: true)
55
+ if curveFunction is params.axisLabelingForCurve
56
+ @set(axisLabelingForCurve: curve)
57
+
58
+ # Wait until graphView has been created, it's initializer resets
59
+ # displayParams
60
+ if params.displayParams?
61
+ _.defer =>
62
+ @displayParams.deserialize(params.displayParams)
@@ -0,0 +1,61 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.BaseAppModel extends Backbone.Model
3
+ # Returns the locale prefixes for the current app. Subapps have all
4
+ # levels as prefix.
5
+ localePrefix: (append = null) ->
6
+ prefixes = []
7
+ path = @path.split('/')
8
+ path.push(append) if append?
9
+ until path.length < 1
10
+ prefixes.push(path.join('.'))
11
+ path.pop()
12
+ if prefixes.length <= 0
13
+ null
14
+ else if prefixes.length is 1
15
+ prefixes[0]
16
+ else
17
+ prefixes
18
+
19
+ # Loads the settings for the current app. This function is subapp
20
+ # aware meaning it prefers the current subapps settings, then the
21
+ # parent apps settings.
22
+ #
23
+ # @param [String] type the settings type (e.g. curves, formFields, defaults, etc.)
24
+ # @param [String] key the settings key (may be undefined)
25
+ # @param [Object] defaults the fixed defaults (those may not be overwritten)
26
+ # @returns [Object] the merged settings
27
+ loadSettings: (type, key, defaults = {}) ->
28
+ @settings ||= {}
29
+ settings = @settings["#{type}_#{key}"] ||= do =>
30
+ settings = {}
31
+ pathComponents = @path.split('/')
32
+ until pathComponents.length < 1
33
+ step = ELA.settings
34
+ step = step[component] for component in pathComponents when step?
35
+ if type? and key?
36
+ settings = $.extend step?[type]?[key], settings
37
+ else
38
+ settings = $.extend step?[type], settings
39
+ pathComponents.pop()
40
+ settings
41
+ $.extend settings, defaults
42
+
43
+ # Loads the default parameters for the current app.
44
+ defaults: ->
45
+ @loadSettings('defaults')
46
+
47
+ # Loads the settings for a specific form field.
48
+ #
49
+ # @param [String] attribute the name of the attribute
50
+ # @param [Object] defaults
51
+ loadFormFieldSettings: (attribute, defaults = {}) ->
52
+ defaults.attribute = attribute
53
+ @loadSettings('formFields', attribute, defaults)
54
+
55
+ # Loads the curve settings for given FUN for the current app.
56
+ #
57
+ # @param [String] fun name of the curve function
58
+ # @param [Object] defaults default values
59
+ loadCurveSettings: (fun, defaults = {}) ->
60
+ defaults.function = fun
61
+ @loadSettings('curves', fun, defaults)
@@ -0,0 +1,212 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.BaseCalculator
3
+ _.extend @prototype, Backbone.Events
4
+
5
+ xRange: (func) -> 1.0
6
+ yRange: (func) ->
7
+ curve = func
8
+ group = _.find @curveGroups, (group) -> _.contains(group, curve)
9
+ minY = null
10
+ maxY = null
11
+ if group?
12
+ for func in group when _.isFunction(@[func])
13
+ result = @[func]()
14
+ maxY = Math.max(result.maxY, maxY)
15
+ minY = Math.min(result.minY, minY)
16
+ else
17
+ result = null
18
+ if _.isFunction(@[func])
19
+ result = @[func]()
20
+ else
21
+ throw new Error("#{func} does not specify a calculator function in #{name}")
22
+ minY = result.minY
23
+ maxY = result.maxY
24
+
25
+ range = 0
26
+ range += maxY if maxY > 0
27
+ range -= minY if minY < 0
28
+ range
29
+
30
+ constructor: (options) ->
31
+ for required in (options.required or [])
32
+ throw "Missing `#{required}` option" unless options[required]?
33
+
34
+ models = _.omit(options, 'required')
35
+
36
+ @_memo = {}
37
+
38
+ this[name] = model for name, model of models
39
+
40
+ @bindEvents(models)
41
+
42
+ bindEvents: (models = {}) ->
43
+ @stopListening()
44
+ for key, obj of models
45
+ do =>
46
+ if obj.on?
47
+ modelName = _.clone(key)
48
+ @listenTo obj, 'change', (model) =>
49
+ for attribute, value of model.changed
50
+ @trigger("change:#{modelName}.#{attribute}", model, value)
51
+
52
+ @_parseForDeps: (funcStr) ->
53
+ for dep in (funcStr.match(/this.([$_a-zA-Z][$_a-zA-Z0-9]*(\.get)?(\([^\)]*\))?)/g) or [])
54
+ dep = dep.slice(5)
55
+ continue if /^[_A-Z][_A-Z0-9]*$/.test(dep) # skip CONSTANTS
56
+ if (match = dep.match(/([^.]+)\.get\(['"]([^'"]+)['"]\)/))
57
+ "#{match[1]}.#{match[2]}"
58
+ else
59
+ ampIndex = dep.indexOf('(')
60
+ if ampIndex > 0
61
+ # Search within parentheses again
62
+ [dep.slice(0, ampIndex), @_parseForDeps(dep.slice(ampIndex))]
63
+ else
64
+ dep
65
+
66
+ @extractDeps: (func) ->
67
+ deps = @_parseForDeps(func.toString())
68
+ _.chain(deps).flatten().compact().uniq().value()
69
+
70
+ @memoize: (name, func) ->
71
+ resolveDeps = (f) ->
72
+ depsBefore = ''
73
+ until f.deps.join('') is depsBefore
74
+ depsBefore = f.deps.join('')
75
+ f.deps = for dep in f.deps
76
+ if /([^.]+)\.([^.]+)/.test(dep)
77
+ dep
78
+ else if this[dep]?
79
+ this[dep].deps or dep
80
+ f.deps = _.chain(f.deps).flatten().compact().uniq().value()
81
+ f.depsResolved = true
82
+
83
+ bindDeps = (f, callback) ->
84
+ for dep in f.deps
85
+ @on "change:#{dep}", =>
86
+ callback()
87
+ @trigger("change:#{name}")
88
+ @_memo[name].eventsBound = true
89
+
90
+ parameters = do ->
91
+ funcStr = func.toString()
92
+ if (match = funcStr.match(/function ?\(([^\)]+)\)/))?
93
+ match[1].split(',')
94
+ else
95
+ []
96
+
97
+ # TODO: Bind Events for dynamic dependencies like this[func] where
98
+ # func is a string parameter when calling the function.
99
+ f = if parameters.length > 0
100
+ ->
101
+ @_memo[name] ||= values: {}, eventsBound: false
102
+ key = JSON.stringify(arguments)
103
+
104
+ unless @_memo[name].values[key]?
105
+ @_memo[name].values[key] = func.apply(this, arguments)
106
+
107
+ resolveDeps.call(this, f) unless f.depsResolved
108
+
109
+ unless @_memo[name].eventsBound
110
+ bindDeps.call this, f, =>
111
+ @_memo[name].values = {}
112
+
113
+ @_memo[name].values[key]
114
+
115
+ else
116
+ ->
117
+ @_memo[name] ||= eventsBound: false
118
+
119
+ unless @_memo[name].value?
120
+ @_memo[name].value = func.apply(this, arguments)
121
+
122
+ resolveDeps.call(this, f) unless f.depsResolved
123
+
124
+ unless @_memo[name].eventsBound
125
+ bindDeps.call this, f, =>
126
+ @_memo[name].value = null
127
+
128
+ @_memo[name].value
129
+
130
+ f.depsResolved = false
131
+ f.memoizable = true
132
+ f.deps = @extractDeps(func)
133
+ f
134
+
135
+ @reactive: (name, func) ->
136
+ resolveDeps = (f) ->
137
+ depsBefore = ''
138
+ resolvedDeps = [] # required to avoid loops
139
+ until f.deps.join('') is depsBefore
140
+ depsBefore = f.deps.join('')
141
+ f.deps = for dep in f.deps
142
+ continue if dep is name
143
+ if /([^.]+)\.([^.]+)/.test(dep)
144
+ dep
145
+ else if this[dep]? and not _.contains(resolvedDeps, dep)
146
+ resolvedDeps.push(dep)
147
+ this[dep].deps or dep
148
+ f.deps = _.chain(f.deps).flatten().compact().uniq().value()
149
+ f.depsResolved = true
150
+
151
+ bindDeps = (f, callback) ->
152
+ for dep in f.deps
153
+ @on "change:#{dep}", =>
154
+ callback() if callback?
155
+ @trigger("change:#{name}")
156
+ @_memo[name].eventsBound = true
157
+
158
+ parameters = do ->
159
+ funcStr = func.toString()
160
+ if (match = funcStr.match(/function \(([^\)]+)\)/))?
161
+ match[1].split(',')
162
+ else
163
+ []
164
+
165
+ # TODO: Bind Events for dynamic dependencies like this[func] where
166
+ # func is a string parameter when calling the function.
167
+ f = ->
168
+ @_memo[name] ||= eventsBound: false
169
+ resolveDeps.call(this, f) unless f.depsResolved
170
+ bindDeps.call(this, f) unless @_memo[name].eventsBound
171
+ f._func.apply(this, arguments)
172
+
173
+ f.depsResolved = false
174
+ f.memoizable = false
175
+ f.deps = @extractDeps(func)
176
+ f._func = func
177
+ f
178
+
179
+ clearMemoizations: ->
180
+ for key, memo of @_memo
181
+ memo.value = null if _.has(memo, 'value')
182
+ memo.values = {} if _.has(memo, 'values')
183
+
184
+ pole: (func, options = {}) ->
185
+ precision = Math.abs(options.precision or 0.001)
186
+ min = options.min or 0.0
187
+ max = options.max or 1.0
188
+ middle = (max + min)*0.5
189
+
190
+ minPos = this[func](min) > 0
191
+ maxPos = this[func](max) > 0
192
+ middlePos = this[func](middle) > 0
193
+
194
+ n = 0
195
+ if minPos is maxPos
196
+ return max
197
+ else
198
+ while middle - min > precision
199
+ y = this[func](middle)
200
+ return middle if y is Infinity or y is -Infinity
201
+
202
+ if minPos is middlePos
203
+ min = middle
204
+ minPos = middlePos
205
+ else
206
+ max = middle
207
+ maxPos = middlePos
208
+
209
+ middle = (max + min)*0.5
210
+ middlePos = this[func](middle) > 0
211
+ n += 1
212
+ min
@@ -0,0 +1,35 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.BaseSubappContainer extends ELA.Models.BaseAppModel
3
+ subapps: {}
4
+
5
+ initialize: (options = {}) ->
6
+ @subappInstances = {}
7
+
8
+ for name, app of @subapps
9
+ AppModel = app.model.toFunction()
10
+ @subappInstances[name] = new AppModel
11
+ parentApp: this
12
+
13
+ @on 'change:path', @handlePath
14
+ @handlePath()
15
+
16
+ handlePath: =>
17
+ path = @get('path')
18
+ subapp = path[0]
19
+ if _.isEmpty(path)
20
+ subappPath = @subappInfo()[0].path
21
+ ELA.router.navigate "app/#{subappPath}",
22
+ trigger: false
23
+ replace: true
24
+ [..., last] = subappPath.split('/')
25
+ path.push(last)
26
+
27
+ @subappInstances[subapp]?.set(path: path.slice(1))
28
+
29
+ subappInfo: ->
30
+ for name, app of @subappInstances
31
+ name: app.name
32
+ path: app.path
33
+
34
+ currentApp: ->
35
+ @subappInstances[@get('path')[0]]
@@ -0,0 +1,179 @@
1
+ ELA.Models ?= {}
2
+ class ELA.Models.Curve extends Backbone.Model
3
+ defaults:
4
+ selected: false
5
+ lineDash: null
6
+ lineWidth: 3
7
+ zIndex: 0
8
+ group: 'general'
9
+ parentCurve: null
10
+
11
+ # https://jsfiddle.net/wct4bctb/
12
+ LINE_DASHES: [
13
+ [],
14
+ [6, 4], # 10
15
+ [2, 2], # 4
16
+ [2, 4, 10, 4], # 20
17
+ [2, 4, 2, 4, 2, 4, 2, 4, 10, 4], # 38
18
+ [26, 6], # 32
19
+ [2, 4, 26, 4] # 36
20
+ [2, 4, 2, 4, 2, 4, 2, 4, 26, 4] # 54
21
+ ]
22
+
23
+ initialize: (attributes, options = {}) ->
24
+ super
25
+
26
+ # We have to reinitialize the subcurves every time. Otherwise they
27
+ # stay as Curve objects in the Model (Beware the scope of the
28
+ # subcurves reference, its class wide).
29
+ subcurves = {}
30
+ for name, subcurve of (attributes.subcurves or {})
31
+ subcurves[name] = new ELA.Models.Curve(subcurve, parentCurve: this)
32
+ @set('subcurves', subcurves)
33
+ @parentCurve = options.parentCurve if options.parentCurve?
34
+
35
+ showInLegend: ->
36
+ show = @get('showInLegend')
37
+ if show? then show else true
38
+
39
+ strokeStyle: ->
40
+ if @get('strokeStyle')?
41
+ @get('strokeStyle')
42
+ else if @parentCurve?
43
+ @parentCurve.strokeStyle()
44
+ else
45
+ index = @collection.filter((c) -> c.attributes.strokeStyle is undefined).indexOf(this)
46
+ length = @collection.length
47
+ saturation = Math.round(65 - 40 * ((index % 20) / 20))
48
+ luminance = Math.round(65 - 15 * ((index % 20) / 20 + 1))
49
+ distance = 360 * 0.61088
50
+ hue = index * distance
51
+ 'hsl(' + hue + ",#{saturation}%,#{luminance}%)"
52
+
53
+ # @return Array canvas lineDash definition
54
+ lineDash: (idx = 0) ->
55
+ @get('lineDash') or @LINE_DASHES[idx % @LINE_DASHES.length]
56
+
57
+ hasSubcurves: ->
58
+ _.keys(@subcurves()).length > 0
59
+
60
+ subcurves: ->
61
+ @get('subcurves')
62
+
63
+ subcurve: (key) ->
64
+ @get('subcurves')[key]
65
+
66
+ select: => @set(selected: true)
67
+ deselect: => @set(selected: false)
68
+
69
+ toJSON: =>
70
+ _.defaults super(),
71
+ strokeStyle: @strokeStyle()
72
+ hsl: @strokeStyle()
73
+
74
+ Presenter: class Presenter extends Backbone.Poised.View
75
+ unitValue: (value) ->
76
+ unitFn = @model.get('unitFn')
77
+ return unitFn(value) if _.isFunction(unitFn)
78
+
79
+ unitFactor = @model.get('unitFactor')
80
+ return unitFactor * value if unitFactor?
81
+
82
+ value
83
+
84
+ # Returns the label.
85
+ #
86
+ # @return String The label
87
+ label: ->
88
+ @_label ||= do =>
89
+ func = @model.get('function')
90
+ @loadLocale "curves.#{func}.label", "curves.#{func}.yAxisLabel", "curves.#{func}.xAxisLabel",
91
+ 'curves.yAxisLabel', 'curves.xAxisLabel',
92
+ defaultValue: func.toLabel()
93
+
94
+ # Returns the x-axis label.
95
+ #
96
+ # @return String The label for the x-axis
97
+ xAxisLabel: ->
98
+ @_xAxisLabel ||= do =>
99
+ func = @model.get('function')
100
+ @loadLocale "curves.#{func}.xAxisLabel", 'curves.xAxisLabel',
101
+ defaultValue: func.toLabel()
102
+
103
+ # Returns the y-axis label.
104
+ #
105
+ # @return String The label for the y-axis
106
+ yAxisLabel: ->
107
+ @_yAxisLabel ||= do =>
108
+ func = @model.get('function')
109
+ @loadLocale "curves.#{func}.yAxisLabel", 'curves.yAxisLabel',
110
+ defaultValue: func.toLabel()
111
+
112
+ # Returns the y axis unit label.
113
+ #
114
+ # With the introduction of distinction between curve specific x
115
+ # and y axis labeling, this function is deprecated in favor of
116
+ # `#xAxisUnitLabel` and `#yAxisUnitLabel`.
117
+ #
118
+ # @deprecated
119
+ #
120
+ # @return String The unit for the y-axis
121
+ unitLabel: ->
122
+ console.log('ELA.Models.Curve.Presenter#unitLabel is deprecated.')
123
+ unit = @model.get('unit')
124
+ if unit then "[#{unit}]" else ''
125
+
126
+ # Returns the x-axis unit label.
127
+ #
128
+ # @return String The unit for the x-axis
129
+ xAxisUnitLabel: ->
130
+ @_xAxisUnitLabel ||= do =>
131
+ func = @model.get('function')
132
+ @loadLocale "curves.#{func}.xAxisUnitLabel", 'curves.xAxisUnitLabel',
133
+ returnNull: true
134
+
135
+ # Returns the y axis unit label.
136
+ #
137
+ # @return String The unit for the y-axis
138
+ yAxisUnitLabel: ->
139
+ @_yAxisUnitLabel ||= do =>
140
+ func = @model.get('function')
141
+ @loadLocale "curves.#{func}.yAxisUnitLabel", 'curves.yAxisUnitLabel',
142
+ returnNull: true
143
+
144
+ # Returns the full label as concatenation of `#label` and
145
+ # `#unitLabel`. Generally used for curve specific axis labling.
146
+ #
147
+ # With the introduction of distinction between curve specific x
148
+ # and y axis labeling, this function is deprecated in favor of
149
+ # `#fullXAxisLabel` and `#fullYAxisLabel`.
150
+ #
151
+ # @deprecated
152
+ #
153
+ # @return String The full curve label
154
+ fullLabel: ->
155
+ console.log('ELA.Models.Curve.Presenter#fullLabel is deprecated.')
156
+ "#{@label()} #{@unitLabel()}"
157
+
158
+ # Returns the full label for the x-axis as concatenation of label
159
+ # and unit label.
160
+ #
161
+ # @return String The full label for the x-axis
162
+ fullXAxisLabel: ->
163
+ unit = @xAxisUnitLabel()
164
+ unit = if unit? then " [#{unit}]" else ''
165
+ "#{@xAxisLabel()}#{unit}"
166
+
167
+ # Returns the full label for the y-axis as concatenation of label
168
+ # and unit label.
169
+ #
170
+ # @return String The full label for the y-axis
171
+ fullYAxisLabel: ->
172
+ unit = @yAxisUnitLabel()
173
+ unit = if unit? then " [#{unit}]" else ''
174
+ "#{@yAxisLabel()}#{unit}"
175
+
176
+ subcurveLabel: (subcurve) ->
177
+ func = @model.get('function')
178
+ @loadLocale "curves.#{func}.subcurves.#{subcurve}.label",
179
+ defaultValue: func