Commit 846ddeb596e7f33dee82a3cc09c4155c8bdcb115
1 parent
9b42ee98
Exists in
rhitier-dev
Show probe source along with probe as target
Showing
1 changed file
with
34 additions
and
1 deletions
Show diff stats
web/static/js/main.js
... | ... | @@ -232,9 +232,20 @@ |
232 | 232 | } |
233 | 233 | }); |
234 | 234 | this.targets[target_slug].active = true; |
235 | + | |
236 | + // 'src_plot': return at once if we are source | |
237 | + if ( target_slug.includes('_src') ){ | |
238 | + return this; | |
239 | + } | |
240 | + // 'src_plot': else also enable orbit | |
235 | 241 | if ((ref$ = this.orbits) != null) { |
236 | 242 | ref$.enableTarget(target_slug); |
237 | 243 | } |
244 | + // 'src_plot': and enable corresponding '_src' slug if exists | |
245 | + var src_slug = target_slug+'_src' | |
246 | + if ( src_slug in this.targets){ | |
247 | + this.enableTarget(src_slug) | |
248 | + } | |
238 | 249 | return this; |
239 | 250 | } |
240 | 251 | |
... | ... | @@ -246,9 +257,20 @@ |
246 | 257 | } |
247 | 258 | }); |
248 | 259 | this.targets[target_slug].active = false; |
260 | + | |
261 | + // 'src_plot': return at once if we are source | |
262 | + if ( target_slug.includes('_src') ){ | |
263 | + return this; | |
264 | + } | |
265 | + // 'src_plot': else also enable orbit | |
249 | 266 | if ((ref$ = this.orbits) != null) { |
250 | 267 | ref$.disableTarget(target_slug); |
251 | 268 | } |
269 | + // 'src_plot': and disable corresponding '_src' slug if exists | |
270 | + var src_slug = target_slug+'_src' | |
271 | + if ( src_slug in this.targets){ | |
272 | + this.disableTarget(src_slug) | |
273 | + } | |
252 | 274 | return this; |
253 | 275 | } |
254 | 276 | |
... | ... | @@ -873,7 +895,14 @@ |
873 | 895 | this.plotWrapper.append('g').classed('x axis', true); |
874 | 896 | this.plotWrapper.append('g').classed('y axis', true); |
875 | 897 | this.yAxisText = this.plotWrapper.append("text").attr("transform", "rotate(-90)").attr("dy", "1em").style("text-anchor", "middle").text(this.title); |
876 | - let y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html(); | |
898 | + // src_plot: If it is a source we want to plot then set small Y-Title | |
899 | + let y_title='' | |
900 | + if ( this.target.slug.includes('_src') ){ | |
901 | + y_title = this.target.name | |
902 | + // src_plot: or just show normal Y-Title | |
903 | + } else { | |
904 | + y_title = this.target.name+" from "+$("input[name='input_slug']:checked").siblings(".mdl-radio__label").html(); | |
905 | + } | |
877 | 906 | this.yAxisTextTarget = this.plotWrapper.append("text").attr("transform", "rotate(-90)") |
878 | 907 | .attr("dy", "1em").style("text-anchor", "middle") |
879 | 908 | .style("font-style", "oblique").text(y_title); |
... | ... | @@ -1568,6 +1597,10 @@ |
1568 | 1597 | } |
1569 | 1598 | |
1570 | 1599 | initOrbiter(slug, config, data) { |
1600 | + // 'src_plot': If it is a source then Dont draw orbit` | |
1601 | + if ( slug.includes('_src') ){ | |
1602 | + return this; | |
1603 | + } | |
1571 | 1604 | const thisOrbit = this; |
1572 | 1605 | let orbit_ellipse; |
1573 | 1606 | let orbiter; | ... | ... |
-
mentioned in commit 9cea80b1f5ee23c7ae638441278d7db591a7afe7