Skip to content

Commit

Permalink
Merge pull request #2105 from CartoDB/13808-ie-popup-with-image
Browse files Browse the repository at this point in the history
Better popups with just images on IE and Edge
  • Loading branch information
VictorVelarde authored Apr 24, 2018
2 parents 3a17e62 + 6210eab commit 2354d72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carto.js",
"version": "4.0.1-0",
"version": "4.0.1-13808",
"description": "CARTO javascript library",
"repository": {
"type": "git",
Expand Down
11 changes: 10 additions & 1 deletion src/geo/ui/infowindow-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,22 @@ var Infowindow = View.extend({
return false;
},

_imageOnHookNotSupported: function () {
var noCssClipPath = util.ie || util.browser.ie || util.browser.edge;
return noCssClipPath;
},

_loadImageHook: function (imageDimensions, coverDimensions, url) {
var $hook = this.$('.CDB-hook');

if (!$hook) {
return;
}

if (this._imageOnHookNotSupported()) {
$hook.hide();
return;
}

var $hookImage = $('<img />')
.addClass('CDB-hookImage js-hookImage')
.attr('src', url);
Expand Down

0 comments on commit 2354d72

Please sign in to comment.