Undo sort, seems it broke a bunch of tests.

mitja/improve-current-page-shapes-sorted
Mitja Bezenšek 2024-04-11 16:33:18 +02:00
rodzic 84b7cdef9c
commit 6405040d7f
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1478,7 +1478,7 @@ export class Editor extends EventEmitter<TLEventMap> {
historyOptions?: TLCommandHistoryOptions
): this {
const ids = shapes.map((shape) => (typeof shape === 'string' ? shape : shape.id))
this._setSelectedShapes(ids.sort(), historyOptions)
this._setSelectedShapes(ids, historyOptions)
return this
}

Wyświetl plik

@ -180,7 +180,7 @@ export class Brushing extends StateNode {
}
this.editor.updateInstanceState({ brush: { ...this.brush.toJson() } })
this.editor.setSelectedShapes(Array.from(results), { squashing: true })
this.editor.setSelectedShapes(Array.from(results).sort(), { squashing: true })
}
override onInterrupt: TLInterruptEvent = () => {