Skip to content

Commit

Permalink
Fix #316 - Sort optional properties alphabetically to match Flash editor
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed Jun 5, 2015
1 parent 1c18eae commit 669d88e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions editor/js/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ var EDITOR = (function ($, parent) {
var html = $('<div>')
.addClass("optButtonContainer");
var table = $('<table>');

// Sort into alphabetical order
node_options['optional'].sort(function(a,b) {
var aN = a.value.label.toLowerCase();
var bN = b.value.label.toLowerCase();
return (aN < bN) ? -1 : ((aN > bN) ? 1 : 0);
});

for (var i=0; i<node_options['optional'].length; i++)
{
Expand Down

0 comments on commit 669d88e

Please sign in to comment.