mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Initial support for mobile devices (#787)
* Initial support for mobile devices No editing yet, but UI looks nice and you can open the canvas menu * Add support for editing shape color, etc * Allow the mobile menus to cover the shape selector * Hopefully fix test error * Fix touch on canvas * Fix safe area handling & remove unused Island
This commit is contained in:
parent
9439908b92
commit
7a7a73b78d
13 changed files with 358 additions and 125 deletions
|
@ -5,6 +5,7 @@ import { saveAsJSON, loadFromJSON } from "../scene";
|
|||
import { load, save } from "../components/icons";
|
||||
import { ToolButton } from "../components/ToolButton";
|
||||
import { t } from "../i18n";
|
||||
import useIsMobile from "../is-mobile";
|
||||
|
||||
export const actionChangeProjectName: Action = {
|
||||
name: "changeProjectName",
|
||||
|
@ -51,6 +52,7 @@ export const actionSaveScene: Action = {
|
|||
icon={save}
|
||||
title={t("buttons.save")}
|
||||
aria-label={t("buttons.save")}
|
||||
showAriaLabel={useIsMobile()}
|
||||
onClick={() => updateData(null)}
|
||||
/>
|
||||
),
|
||||
|
@ -71,6 +73,7 @@ export const actionLoadScene: Action = {
|
|||
icon={load}
|
||||
title={t("buttons.load")}
|
||||
aria-label={t("buttons.load")}
|
||||
showAriaLabel={useIsMobile()}
|
||||
onClick={() => {
|
||||
loadFromJSON()
|
||||
.then(({ elements, appState }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue