mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 17:48:11 +08:00
Add copy/cut/paste/duplicate functionality for path geometry (#2812)
* Copy and Paste for paths * Fix merge * Implement Copy, Cut and Duplicate * Fix selection of segments * Fix formatting * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
34a8b9b6f1
commit
b9a1b2e951
@@ -629,13 +629,20 @@ impl EditorHandle {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Paste layers from a serialized json representation
|
||||
/// Paste layers from a serialized JSON representation
|
||||
#[wasm_bindgen(js_name = pasteSerializedData)]
|
||||
pub fn paste_serialized_data(&self, data: String) {
|
||||
let message = PortfolioMessage::PasteSerializedData { data };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Paste vector data into a new layer from a serialized JSON representation
|
||||
#[wasm_bindgen(js_name = pasteSerializedVector)]
|
||||
pub fn paste_serialized_vector(&self, data: String) {
|
||||
let message = PortfolioMessage::PasteSerializedVector { data };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = clipLayer)]
|
||||
pub fn clip_layer(&self, id: u64) {
|
||||
let id = NodeId(id);
|
||||
|
||||
Reference in New Issue
Block a user