[skottie player] Disable key sorting in editor
The original/export order keeps related fields together.
Additionally, reordering seems to throw off Lottie/Android in some cases.
Change-Id: Id736691ccb6db9df7acbbcadf28529ed1c4a44c1
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/282478
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/skottie/modules/skottie-sk/skottie-sk.js b/skottie/modules/skottie-sk/skottie-sk.js
index a873f45..1aaec31 100644
--- a/skottie/modules/skottie-sk/skottie-sk.js
+++ b/skottie/modules/skottie-sk/skottie-sk.js
@@ -561,7 +561,8 @@
// See https://github.com/josdejong/jsoneditor/blob/master/docs/api.md
// for documentation on this editor.
let editorOptions = {
- sortObjectKeys: true,
+ // Use original key order (this preserves related fields locality).
+ sortObjectKeys: false,
// There are sometimes a few onChange events that happen
// during the initial .set(), so we have a safety variable
// _editorLoaded to prevent a bunch of recursion