railmapgen / rmp

Design your own rail map by freely dragging stations from different cities and connecting them with 135-degree rounded corners or perpendicular lines!
https://railmapgen.github.io/?app=rmp
GNU General Public License v3.0
82 stars 15 forks source link

问题:选择多个站点时无法正确显示部分信息 #685

Open xiao-slm opened 3 months ago

xiao-slm commented 3 months ago

问题:选择多个站点时无法正确显示部分信息

https://github.com/railmapgen/rmp/assets/146796722/189d68af-6528-4f82-a9ef-7d60a24e1624

thekingofcity commented 3 months ago

https://github.com/railmapgen/rmp/blob/e18553ab1a176aca9ab442ccae43d4788c39a7aa/src/components/panels/details/station-type-section.tsx#L36

@langonginc Looks like this is not recalculated after selected is changed. However, this component will be remounted when selected.length from >=2 to 1. I could not reproduce this problem anymore in my local environment after several log, even after I removed them. Feel free to have a deeper investigation :)