Fix typo, simplify a legacy IE check

This commit is contained in:
Austin Hyde
2014-01-31 11:38:08 -05:00
parent 9ffed5bf5f
commit ff4f4be8aa
2 changed files with 2 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ ol.LEGACY_IE_SUPPORT = false;
* @type {boolean}
*/
ol.IS_LEGACY_IE = goog.userAgent.IE &&
goog.userAgent.isVersionOrHigher('9.0') && goog.userAgent.VERSION !== '';
!goog.userAgent.isVersionOrHigher('9.0') && goog.userAgent.VERSION !== '';
/**

View File

@@ -41,9 +41,7 @@ ol.renderer.dom.Map = function(container, map) {
// in IE < 9, we need to return false from ondragstart to cancel the default
// behavior of dragging images, which is interfering with the custom handler
// in the Drag interaction subclasses
if (ol.LEGACY_IE_SUPPORT && goog.userAgent.IE &&
!goog.userAgent.isVersionOrHigher('9.0') &&
goog.userAgent.VERSION !== '') {
if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {
this.layersPane_.ondragstart = goog.functions.FALSE;
this.layersPane_.onselectstart = goog.functions.FALSE;
}