-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update preview when file is updated in ImageEditor #1554
Conversation
Signed-off-by: Louis Chemineau <louis@chmn.me>
/backport to stable25 |
@close="onClose" /> | ||
|
||
<img v-else | ||
<img v-else-if="data !== null" |
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.
Needed as we are using a concatenation for the src
prop which seem to interfere with AsyncComputed
logic.
The issue was that a request with null
was sent instead of waiting for data
to be initialized.
:alt="alt" | ||
:class="{ | ||
dragging, | ||
loaded, | ||
zoomed: zoomRatio !== 1 | ||
}" | ||
:src="data" | ||
:src="`${data}${cacheBuster}`" |
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.
Simple approach, but it works. Sexier idea welcome. :)
This makes sure that the initial request can use the browser's cache, and that on an update the cache is busted with ?buster=1
After editing an image with the new editor, the preview stays the same when closing the editor. This PR makes sure that the preview will be updated.