Open Jmales opened 8 years ago
Solved it. Added my own function which is called by either MouseUpHandler()
and OnResize()
.
For people with the same trouble:
var parentHeight = document.getElementById("visPanel").clientHeight;
var parentWidth = document.getElementById("visPanel").clientWidth;
var canvases = document.getElementsByClassName("chart");
var lengthArrayCanvas = canvases.length;
for (var i = 0; i < lengthArrayCanvas; i++) {
canvases[i].style.maxHeight = parentHeight / lengthArrayCanvas + 'px';
canvases[i].style.maxWidth = parentWidth + 'px';
canvases[i].style.height = canvases[i].style.maxHeight;
}
So, I have a 4-split window and when I resize via dragging a vertical splitbar, the contents of each panel get resized.
However when I do it with an horizontal splitbar nothing resizes and I just get a scroll down bar, which is not what I want.
The code:
Also, I'm trying to catch the clientWidth and clientHeight in onResize() but that only works when the whole window is resized and not each pane. What is happening?
I'm using v1.4.2.