jsvectormap icon indicating copy to clipboard operation
jsvectormap copied to clipboard

Size only by visible div

Open stefanwerfling opened this issue 1 year ago • 1 comments

Why is the height and width of the SVG only determined via the div? It's a bad implementation. You should also be able to set the height and width using the options. My current workaround is now as follows:

this._element = jQuery('<div style="width: 100%; height: 400px"></div>').appendTo(telement);

        this._map = new JsVectorMap({
            selector: jQuery(this._element)[0],
            map: 'world',
            regionsSelectable: true
        });

        this._element.on('resize', () => {
            this._map.updateSize();
        });

stefanwerfling avatar Feb 19 '25 13:02 stefanwerfling

Hi @stefanwerfling sorry for the late response.

I'll see what I can do about this, and let you know.

themustafaomar avatar Apr 12 '25 00:04 themustafaomar