Migrate to using MoveSelectedLayersTo (#469)

* migrate to using MoveSelectedLayersTo

* Fix dragging a selected layer with multiple selected layers

* Fix CreatedLayer overriding selection

* Fix MoveSelectedLayersTo behaviour

* Squashed commit of the following:

commit 095d577a49
Author: Keavon Chambers <keavon@keavon.com>
Date:   Mon Jan 10 18:06:12 2022 -0800

    Fix NumberInput clamping regression with undefined bounds

commit 9f54a376c4
Author: mfish33 <32677537+mfish33@users.noreply.github.com>
Date:   Sun Jan 9 15:52:55 2022 -0800

    Fix bounds with artboards for zoom-to-fit and scrollbar scaling (#473)

    * - document load keeps postition
    - zoom to fit
    - scrollbars use artboard dimensions

    * - review comments
    - svg export uses all artboard bounds

    Co-authored-by: Keavon Chambers <keavon@keavon.com>

commit 61432de480
Author: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Date:   Sat Jan 8 21:06:15 2022 +0000

    Fix rotation input (#472)

* Fix insert with no nesting at end of panel

* Deselect other layers on paste

* Resolve logging
This commit is contained in:
0HyperCube
2022-01-12 19:05:55 +00:00
committed by GitHub
parent 574028375b
commit c76c92e500
4 changed files with 83 additions and 104 deletions
+2 -2
View File
@@ -383,8 +383,8 @@ impl JsEditorHandle {
}
/// Move a layer to be next to the specified neighbor
pub fn move_layer_in_tree(&self, layer: Vec<LayerId>, insert_above: bool, neighbor: Vec<LayerId>) {
let message = DocumentMessage::MoveLayerInTree { layer, insert_above, neighbor };
pub fn move_layer_in_tree(&self, path: Vec<LayerId>, insert_index: isize) {
let message = DocumentMessage::MoveSelectedLayersTo { path, insert_index };
self.dispatch(message);
}