jsMind

view.hmargin and view.vmargin Options

Option Name Data Type Default Value Description
view.hmargin number Container’s width Minimum horizontal distance between the mind map and the container’s outer frame (in pixels)
view.vmargin number Container’s height Minimum vertical distance between the mind map and the container’s outer frame (in pixels)

Option Description

The hmargin and vmargin options are used to set the minimum horizontal and vertical distances between the mind map and the container’s outer frame. These two parameters determine how close the mind map can be to the container’s border. If you consider the mind map itself as an object, these two parameters are similar to the margin (CSS) property of that object.

Usage Example

Below is an example of setting the hmargin and vmargin options:

var options = {
    container: 'jsmind_container',
    editable: true,
    theme: 'primary',
    view: {
        hmargin: 100, // Set the minimum horizontal distance to 100 pixels
        vmargin: 50,  // Set the minimum vertical distance to 50 pixels
    }
};

In the example above, the hmargin option is set to 100 pixels, and the vmargin option is set to 50 pixels. This means that the minimum horizontal distance between the mind map and the container is 100 pixels, and the minimum vertical distance is 50 pixels.

copyright notice

Reproduction and deduction are prohibited.

The jsMind project is still being updated and the corresponding documentation is updated at the same time as the version is updated. In order to avoid confusion to the user, it is forbidden to reprint this document without written permission and to make changes of any kind to this document.