[BUGFIX] Test property of the sidebar to set map position
This commit is contained in:
parent
72d2b63782
commit
f53dc243f1
@ -21,12 +21,10 @@ define(function () {
|
|||||||
sidebar.appendChild(container);
|
sidebar.appendChild(container);
|
||||||
|
|
||||||
self.getWidth = function getWidth() {
|
self.getWidth = function getWidth() {
|
||||||
if (sidebar.classList.contains('hidden')) {
|
if (sidebar.classList.contains('hidden') || button.offsetHeight === 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
return sidebar.offsetWidth;
|
||||||
var small = window.matchMedia('(max-width: 630pt)');
|
|
||||||
return small.matches ? 0 : sidebar.offsetWidth;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.add = function add(d) {
|
self.add = function add(d) {
|
||||||
|
Loading…
Reference in New Issue
Block a user