We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after map.setActiveArea({with some css}) the plugin creates a div with the given properties.
If I want to change the active area size later, I wish to just use the same function again, with new css: map.setActiveArea({new css properties});
however, this creates a new div again, if I am not mistaken. Because:
setActiveArea: function (css) { var container = this.getContainer(); this._viewport = L.DomUtil.create('div', ''); container.insertBefore(this._viewport, container.firstChild); if (typeof css === 'string') { this._viewport.className = css; } else { L.extend(this._viewport.style, css); } return this; }
If I put in a simple check for already existing viewport, I can avoid this and get the functionality I want:
setActiveArea: function (css) { if( !this._viewport ){ //Make viewport if not already made var container = this.getContainer(); this._viewport = L.DomUtil.create('div', ''); container.insertBefore(this._viewport, container.firstChild); } if (typeof css === 'string') { this._viewport.className = css; } else { L.extend(this._viewport.style, css); } return this; }
Valid feature for merging?
The text was updated successfully, but these errors were encountered:
Yes. Will you make a PR ?
Sorry, something went wrong.
Yes, working on it and adding test cases
No branches or pull requests
after map.setActiveArea({with some css})
the plugin creates a div with the given properties.
If I want to change the active area size later, I wish to just use the same function again, with new css:
map.setActiveArea({new css properties});
however, this creates a new div again, if I am not mistaken. Because:
If I put in a simple check for already existing viewport, I can avoid this and get the functionality I want:
Valid feature for merging?
The text was updated successfully, but these errors were encountered: