user7539157
user7539157

Reputation:

Mapbox - mapbox-gl-compare options

Does the mapbox-gl-compare plugin have any options for controlling the initial position of div.mapboxgl-compare? By default it is a split view 50/50. But I would like it load full position to the left? Hiding the second map.

Or does someone know to approach this?

GitHub - mapbox-gl-compare

Upvotes: 0

Views: 738

Answers (1)

James Gould
James Gould

Reputation: 4712

If you take a look at the source, function o(t, e, n) { } (which initialises the plugin) contains the following setting: this._setPosition(this._bounds.width / 2).

You'll be able to edit this to fit your needs.

Upvotes: 1

Related Questions