clearWith and Images
Posted: Tue Nov 07, 2023 10:43 am
Hi
Can I check the logic of clearWith and images, please?
An example of what I am doing would have two controls boolean xxx and yyy (anything).
What I am wanting is that an image is left unchanged if option xxx is false, but redrawn if x is true or if yyy option changes.
So, I put this into the .a.yaml
Inside the R code, I call self$results$graphPlot$setState(imageStuff) to change the image when xxx is true but don't call it if xxx is false. A separate .plotGraph() function then prints the imageStuff.
When I do this, what happens is that the image is redrawn when xxx is true or yyy changes (as I want), but when xxx is set to false or xxx is false and yyy is changed, then the image just disappears.
I hope this makes sense. Is there anything I am not understanding?
Many thanks,
Can I check the logic of clearWith and images, please?
An example of what I am doing would have two controls boolean xxx and yyy (anything).
What I am wanting is that an image is left unchanged if option xxx is false, but redrawn if x is true or if yyy option changes.
So, I put this into the .a.yaml
Code: Select all
- name: graphPlot
type: Image
renderFun: .plotGraph
clearWith:
- yyy
When I do this, what happens is that the image is redrawn when xxx is true or yyy changes (as I want), but when xxx is set to false or xxx is false and yyy is changed, then the image just disappears.
I hope this makes sense. Is there anything I am not understanding?
Many thanks,