You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to have a list of images (similar to what's described in #193 ) and then have these displayed in a single image tag, updating as connected to a different metadata entry.
I was able to make something like this work with this set of code, where I use js-engine to create markdown strings that embed the images.
I separated the two into different codeblocks so they would potentially be able to re-render separately, but I see the same thing when they're together in the same markdown.create string.
{photos} as photos
{memory^selectedPhoto} as selectedPhoto
---
if (context.bound.photos.length == 0) return;
return engine.markdown.create(
`![](${context.bound.photos[context.bound.selectedPhoto - 1]})`
)
What I'm seeing with this is that it's re-rendering fairly frequently, and it re-renders both blocks -- and even with very small images, it's really quite laggy. (Additionally, you can't use the arrow keys on the slider, as it is re-rendered and so loses focus whenever the selected photo changes.) I assume this is because the bound variables are changing, so it has to re-create the blocks. What I'm wondering is if it's possible to have a VIEW that supports images. My thinking is that potentially this would prevent having to recreate and reflow the img tag.
Were that the case, I imagine having something like `VIEW[
I think it might be possible to make this work with just pure js-engine (although I'd have to resolve the imgsrc tags to a vault-relative location) but it also seems like it might fit in meta-bind.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Makes sense, the plugin is built in a way that all the expensive stuff is done during the creation of the input fields. And creating an input field from a markdown string has quite a few steps.
Is your Feature Request Related to a Problem?
No response
Describe the Feature you'd Like
I'd like to be able to have a list of images (similar to what's described in #193 ) and then have these displayed in a single image tag, updating as connected to a different metadata entry.
I was able to make something like this work with this set of code, where I use
js-engine
to create markdown strings that embed the images.I separated the two into different codeblocks so they would potentially be able to re-render separately, but I see the same thing when they're together in the same
markdown.create
string.What I'm seeing with this is that it's re-rendering fairly frequently, and it re-renders both blocks -- and even with very small images, it's really quite laggy. (Additionally, you can't use the arrow keys on the slider, as it is re-rendered and so loses focus whenever the selected photo changes.) I assume this is because the bound variables are changing, so it has to re-create the blocks. What I'm wondering is if it's possible to have a
VIEW
that supports images. My thinking is that potentially this would prevent having to recreate and reflow theimg
tag.Were that the case, I imagine having something like `VIEW[
I think it might be possible to make this work with just pure
js-engine
(although I'd have to resolve theimg
src
tags to a vault-relative location) but it also seems like it might fit inmeta-bind
.Additional Context
No response
The text was updated successfully, but these errors were encountered: