customize Excalidraw options

This commit is contained in:
Andre Staltz 2024-01-04 14:42:55 +02:00
parent e46582f42b
commit 110df1fb55
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
3 changed files with 26 additions and 3 deletions

View File

@ -17,8 +17,8 @@ const URL = require('node:url')
function createWindow() {
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
width: 1200,
height: 800,
webPreferences: {
preload: Path.join(__dirname, 'preload.js'),
},

View File

@ -13,3 +13,11 @@
width: 80vw;
height: 100vh;
}
.excalidraw .dropdown-menu .dropdown-menu-item[data-testid="json-export-button"],
.excalidraw .dropdown-menu .dropdown-menu-group,
.excalidraw .dropdown-menu div:not([class]),
label[title="Library"]
{
display: none;
}

View File

@ -6,7 +6,22 @@ function App() {
<div className="App">
<div className="Sidebar"></div>
<div className="Main">
<Excalidraw />
<Excalidraw
UIOptions={{
canvasActions: {
changeViewBackgroundColor: false,
clearCanvas: false,
export: { saveFileToDisk: true },
loadScene: false,
saveToActiveFile: false,
toggleTheme: false,
saveAsImage: true,
},
tools: {
image: false,
},
}}
/>
</div>
</div>
)