-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
in stage.js there the following code inside the update method.
if (!(laneName in this.map_)) {
this.map_[laneName] = {};
this.laneID_Map[laneName] = Object.keys(this.laneID_Map).length;
// レーンが増えたため,ID を振り直す
let i = 0;
for (let key in Object.keys(this.laneID_Map).sort()) {
this.laneID_Map[key] = i;
i++;
}
Why wouldn't suffice just assigning the new laneName to the last number as done in
this.laneID_Map[laneName] = Object.keys(this.laneID_Map).length;
I don't know why would be necessary to reassign the whole laneID_Map object when the value given by the .length
it's fine.
I notice this because for coloring reasons it's nice to assign different lane ids.
Metadata
Metadata
Assignees
Labels
No labels