paste inside the viewport (#214)

This commit is contained in:
Abhishek Kulshrestha 2020-01-07 01:06:48 +05:30 committed by Faustino Kialungila
parent 5ade8987e4
commit b12ea7de3e

View File

@ -319,8 +319,8 @@ class App extends React.Component<{}, AppState> {
) {
clearSelection(elements);
parsedElements.forEach(parsedElement => {
parsedElement.x += 10;
parsedElement.y += 10;
parsedElement.x = 10 - this.state.scrollX;
parsedElement.y = 10 - this.state.scrollY;
parsedElement.seed = randomSeed();
generateDraw(parsedElement);
elements.push(parsedElement);