-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/excalidraw #50
Conversation
✅ Deploy Preview for teaching-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -214,20 +214,26 @@ abstract class iDocument<Type extends DocumentType> { | |||
} | |||
|
|||
@action | |||
_save() { | |||
_save(onBeforeSave: () => Promise<void> = () => Promise.resolve()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new concept - if work needs to be done before saving (as generating the preview-image of excalidraw), a Promise can be passet to model.save
and it will be called only when the debounced _save
is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍 I could see this become useful in other future scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, and I tested it on Netlify: it seems to work flawlessly 🥳 Thanks, very cool addition!
@@ -214,20 +214,26 @@ abstract class iDocument<Type extends DocumentType> { | |||
} | |||
|
|||
@action | |||
_save() { | |||
_save(onBeforeSave: () => Promise<void> = () => Promise.resolve()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍 I could see this become useful in other future scenarios.
Excalidraw
Adds the type
Excalidoc
which contains the scene data of an excalidraw document. Excalidraw is a react library that is handy for quick drawings with simple geometries, pencils, text and images.👉 https://deploy-preview-50--teaching-dev.netlify.app/docs/komponentengalerie/excalidoc/
Stuff to do: