Skip to content

Commit

Permalink
$mol_plot_graph: repos calc for each coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Jun 13, 2024
1 parent aeba86c commit b2ae8da
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions plot/graph/graph.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,12 @@ namespace $.$$ {
const series_x = this.series_x()
const series_y = this.series_y()
for(let i = 0; i < series_x.length; i++) {
if( series_x[i] > next.x.max ) next.x.max = series_x[i]
if( series_x[i] < next.x.min ) next.x.min = series_x[i]
if( series_y[i] > next.y.max ) next.y.max = series_y[i]
if( series_y[i] < next.y.min ) next.y.min = series_y[i]
if( series_x[i] > next.x.max ) next.x.max = this.repos_x( series_x[i] )
if( series_x[i] < next.x.min ) next.x.min = this.repos_x( series_x[i] )
if( series_y[i] > next.y.max ) next.y.max = this.repos_y( series_y[i] )
if( series_y[i] < next.y.min ) next.y.min = this.repos_y( series_y[i] )
}

next.x.max = this.repos_x( next.x.max )
next.x.min = this.repos_x( next.x.min )
if( next.x.max < next.x.min ) next.x = next.x.inversed
next.y.max = this.repos_y( next.y.max )
next.y.min = this.repos_y( next.y.min )
if( next.y.max < next.y.min ) next.y = next.y.inversed

return next
}

Expand Down

0 comments on commit b2ae8da

Please sign in to comment.