mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
21 lines
605 B
JavaScript
21 lines
605 B
JavaScript
![]() |
let clipboardData;
|
||
|
|
||
|
function copySelection() {
|
||
|
|
||
|
}
|
||
|
|
||
|
function pasteSelection() {
|
||
|
imageDataToMove = clipboardData;
|
||
|
updateMovePreview();
|
||
|
}
|
||
|
|
||
|
function cutSelectionTool() {
|
||
|
// Getting the selected pixels
|
||
|
clipBoardData = currentLayer.context.getImageData(startX, startY, endX - startX + 1, endY - startY + 1);
|
||
|
|
||
|
currentLayer.context.clearRect(startX - 0.5, startY - 0.5, endX - startX + 1, endY - startY + 1);
|
||
|
// Moving those pixels from the current layer to the tmp layer
|
||
|
//TMPLayer.context.putImageData(imageDataToMove, startX + 1, startY);
|
||
|
|
||
|
//originalDataPosition = [currentPos[0], currentPos[1]];
|
||
|
}
|