feat: Image resizing (#4368)

* wip

* works

* wip

* refactor

* Support replacing image and retain width
fix: Copy paste does not retain size

* cleanup

* fix: Cannot resize past 100%
fix: Borders to edges on unresized images

* Handle Escape key while dragging

* fix: Embeds and images dont render when edit state changes
fix: Small animation regression
This commit is contained in:
Tom Moor
2022-11-02 18:40:37 -07:00
committed by GitHub
parent 6f8d01df21
commit 5e17b24869
5 changed files with 311 additions and 46 deletions

View File

@@ -24,6 +24,12 @@ import { initSentry } from "./utils/sentry";
initI18n();
const element = window.document.getElementById("root");
history.listen(() => {
requestAnimationFrame(() =>
window.dispatchEvent(new Event("location-changed"))
);
});
if (env.SENTRY_DSN) {
initSentry(history);
}