feat: [planning-design] Ctrl+X 잘라내기 기능 추가 (단일/다중)
This commit is contained in:
@@ -2811,6 +2811,11 @@ function planningCanvas() {
|
|||||||
this.sbCopyBlock();
|
this.sbCopyBlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ((e.ctrlKey || e.metaKey) && (e.key === 'x' || e.key === 'X')) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.sbCutBlock();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((e.ctrlKey || e.metaKey) && (e.key === 'v' || e.key === 'V')) {
|
if ((e.ctrlKey || e.metaKey) && (e.key === 'v' || e.key === 'V')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.sbPasteBlock();
|
this.sbPasteBlock();
|
||||||
@@ -3194,6 +3199,11 @@ function planningCanvas() {
|
|||||||
this._sbClipboard = JSON.parse(JSON.stringify(blk));
|
this._sbClipboard = JSON.parse(JSON.stringify(blk));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sbCutBlock() {
|
||||||
|
this.sbCopyBlock();
|
||||||
|
this.sbDeleteSelectedBlock();
|
||||||
|
},
|
||||||
|
|
||||||
sbPasteBlock() {
|
sbPasteBlock() {
|
||||||
if (!this._sbClipboard) return;
|
if (!this._sbClipboard) return;
|
||||||
const page = this.sbCurrentPage;
|
const page = this.sbCurrentPage;
|
||||||
|
|||||||
Reference in New Issue
Block a user