Skip to content

Commit

Permalink
[UPD] typo + calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Oct 11, 2021
1 parent 36cee7e commit d31059a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions dist/ol-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ ol.ext.element.scrollDiv = function(elt, options) {
scrollbar.style.height = (pheight / height) * 100 +'%';
scrollbar.style.top = elt.scrollTop * (pheight / height) +'px';
// No scroll
if (pheight === height) {
if (pheight >= height) {
scrollbar.style.display = 'none';
} else {
scrollbar.style.display = '';
Expand Down Expand Up @@ -31602,7 +31602,6 @@ ol.Overlay.Popup.prototype.show = function (coordinate, html) {
.forEach(function(image) {
image.addEventListener('load', function() {
try { map.renderSync(); } catch(e) { /* ok */ }
console.log('load')
self.content.dispatchEvent(new Event('scroll'));
});
});
Expand Down
2 changes: 1 addition & 1 deletion dist/ol-ext.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/overlay/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ ol_Overlay_Popup.prototype.show = function (coordinate, html) {
.forEach(function(image) {
image.addEventListener('load', function() {
try { map.renderSync(); } catch(e) { /* ok */ }
console.log('load')
self.content.dispatchEvent(new Event('scroll'));
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/util/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ ol_ext_element.scrollDiv = function(elt, options) {
scrollbar.style.height = (pheight / height) * 100 +'%';
scrollbar.style.top = elt.scrollTop * (pheight / height) +'px';
// No scroll
if (pheight === height) {
if (pheight >= height) {
scrollbar.style.display = 'none';
} else {
scrollbar.style.display = '';
Expand Down

0 comments on commit d31059a

Please sign in to comment.