Skip to content

Size only by visible div #177

@stefanwerfling

Description

@stefanwerfling

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();
        });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions