We’re looking to adjust the heights of the headers in our implementation of Layout and Accordion. To do so, we are adjusting the CSS height values, but this does not fully adjust the height; the appropriate “skinParams” value must also be adjusted (“cpanel_height” in the case of Layout and “cell_height” for Accordion.)
We’ve extended the Layout code with the following prototype:
dhtmlXLayoutObject.prototype.setHeaderSize = function(height,collapsedHeight,collapsedWidth) {
this.skinParams[this.skin]["cpanel_height"] = height||this.skinParams[this.skin]["cpanel_height"];
this.skinParams[this.skin]["cpanel_collapsed_height"] = collapsedHeight||this.skinParams[this.skin]["cpanel_collapsed_height"];
this.skinParams[this.skin]["cpanel_collapsed_width"] = collapsedWidth||this.skinParams[this.skin]["cpanel_collapsed_width"];
this.setSkin(this.skin);
}
Accordion has the “setSkinParameters” function, but it does not modify the height (only spacing and offset.)
We can extend Accordion the same way as we did Layout, but were wondering if there is a better way to acheive the same result. We don’t want to modify the DHTMLx JS files as that would make them harder to upgrade/patch in the future.
Thanks!