sortFunction 
  abstract var sortFunction: (layerA: Layer<*>, layerB: Layer<*>, nameA: String, nameB: String) -> JsNumber?(source)
A compare function that will be used for sorting the layers, when sortLayers is true.
The function receives both the Layer instances and their names, as in
sortFunction(layerA, layerB, nameA, nameB)Content copied to clipboard
By default, it sorts layers alphabetically by their name.