Closed mindstorm8191 closed 6 years ago
I found another example online of custom object sorting, and used that to good success. Instead of creating your own sort function that defines if one block is greater or less than another, this definition function needs its own name (I called it compare). You then need to pass the name of that function when calling sort(). See here: https://www.sitepoint.com/sort-an-array-of-objects-in-javascript/
Setting the priority level on blocks doesn't work right now. I need to find a way to sort blocks in the blocklist, but the sorting function doesn't work, and I don't know why. Any help / insight would be appreciated.