Browse Source

paste to center on touch screen

Ryan Di 2 weeks ago
parent
commit
691ece340f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/excalidraw/components/App.tsx

+ 2 - 2
packages/excalidraw/components/App.tsx

@@ -3125,7 +3125,7 @@ class App extends React.Component<AppProps, AppState> {
         this.addElementsFromPasteOrLibrary({
           elements,
           files: data.files || null,
-          position: "cursor",
+          position: this.isMobileOrTablet() ? "center" : "cursor",
           retainSeed: isPlainPaste,
         });
       } else if (data.text) {
@@ -3143,7 +3143,7 @@ class App extends React.Component<AppProps, AppState> {
             this.addElementsFromPasteOrLibrary({
               elements,
               files,
-              position: "cursor",
+              position: this.isMobileOrTablet() ? "center" : "cursor",
             });
 
             return;