Skip to content

Commit

Permalink
Fix order.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongl committed Sep 9, 2024
1 parent ddcd027 commit 766f3b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/plotly/SharedAxis.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ object SharedAxis:
def share(a: Intervals): PartialPlotDataAutobinx => PartialPlotDataAutobinx =
val (_, r) = a.foldLeft(0.0 -> List.empty[Meter]):
case ((s, t), i) => (i.distance + s) -> (i.distance + s :: t)
r.map(_.round).reverse
_.setX(r.toJSArray)
println(r.reverse)
_.setX(r.reverse.toJSArray)
2 changes: 1 addition & 1 deletion src/plotly/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ given history(
plotly_click,
accept[PlotMouseEvent]: e =>
val i = e.points(0).curveNumber.intValue
val is = h(i).reverse
val is = h(i)
is.render(r).`then`(summon[Listen[Intervals, plotly_legendclick]](is, _))
)

Expand Down

0 comments on commit 766f3b2

Please sign in to comment.