-
Notifications
You must be signed in to change notification settings - Fork 29
autoResize not working #20
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
Comments
Falling back to |
I had some issues regarding the responsiveness, this works for me on latest:
|
This in conjunction with |
I am using this with Vuetify and the following code is resizing is working; |
@JLBlueDom that doesn't have effect for me. I suspect the difference is that you're putting the graph in a responsive layout (e.g. Vuetify/Bootstrap) whereas I'm using old school fixed container sizes. Either way, if you agree this snippet is required, I'll create a fork and PR |
Your suspicion may be correct. All I really know is it works perfectly in Vuetify. :) |
I use import ReziseSensor from "css-element-queries/src/ResizeSensor";
//....
mounted() {
new ReziseSensor(this.$el, () => {
this.$refs.plotly.relayout({
width: this.$el.clientWidth,
height: this.$el.parentElement.clientHeight
})
})
} |
@kjschiroo the solution is relatively simple. Wherever you make you component, on the component itself set: <Plotly :autoResize="true"/> See: #27 for more details as to why. |
autoResize
doesn't appear to be working, and it looks like it might be a two part issue.In this commit the code went from using the function generated by
debounce
as the event listener, to accidentally throwing that function away. The result here is thatthis.react
never ends up getting called because the generated debouncing function never got called.I would suspect that this snippet would fix that aspect of the problem
however javascript isn't my strongest language.
The second part of it is that even once this change is made and
react
gets called, it still doesn't appear to successfully resize the image. I haven't ruled out that just being part of my specific setup though. Thoughts?The text was updated successfully, but these errors were encountered: