Posted 8 September 2017, 12:43 am EST
Hi,
I’m implementing a custom UI using spreadJS as a base but I need to hide the scrollbars. To remove them, I’m hiding the element through jQuery, but the space is still reserved after this operation.
Is there a way to do this or a planned feature?
Code I’ve tried:
var elementToUpdate = “#” + self.elementClientId + “-Spread”;
// Otherwise we’re paging so hide scrollbars.
$(elementToUpdate + “hs”).hide();
$(elementToUpdate + “vs”).hide();
//If showing scrollbars, oversize the element and hide overflow, so we can slip the bars off the control
if (typeof self.spread != “undefined”) {
var height = $(elementToUpdate).height();
var width = $(elementToUpdate).width();
$(elementToUpdate).css(“width”, width + 20);
$(elementToUpdate).css(“height”, height + 20);
$(elementToUpdate).wijspread(“refresh”);
//Now, size the elements back down to hide the space the bars occupied
$(elementToUpdate).css(“width”, width + 2);
$(elementToUpdate).css(“height”, height + 2);
}