Last active
December 14, 2015 02:29
-
-
Save alexgb/5014282 to your computer and use it in GitHub Desktop.
Airbnb marker fix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var markers = require('search/amm').markers, | |
originalHover = AirbnbSearch.hoverListResult, | |
originalUnHover = AirbnbSearch.unHoverListResult; | |
AirbnbSearch.hoverListResult = function(id) { | |
var markerSpec = markers[id]; | |
markerSpec.originalZIndex = markerSpec.marker.getZIndex(); | |
markerSpec.marker.setZIndex(markerSpec.numbered_pin + 1000); | |
originalHover.apply(AirbnbSearch, arguments); | |
}; | |
AirbnbSearch.unHoverListResult = function(id) { | |
var markerSpec = markers[id]; | |
markerSpec.marker.setZIndex(markerSpec.originalZIndex); | |
originalUnHover.apply(AirbnbSearch, arguments); | |
}; | |
})(); |
Author
alexgb
commented
Feb 22, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment