Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed an issue which prevented jVectorMap to work in Opera

  • Loading branch information...
commit 6c558ee7b45842c4cc61aa3d293df4ee84812393 1 parent a88f56f
@bjornd authored
Showing with 5 additions and 6 deletions.
  1. +5 −5 lib/world-map.js
  2. +0 −1  tests/markers.html
View
10 lib/world-map.js
@@ -348,7 +348,7 @@ jvm.WorldMap.prototype = {
mouseMoved = true;
});
- this.container.delegate('.jvectormap-region, .jvectormap-marker', 'mouseover mouseout', function(e){
+ this.container.delegate('.jvectormap-element', 'mouseover mouseout', function(e){
var path = this,
type = jvm.$(this).attr('class').indexOf('jvectormap-region') === -1 ? 'marker' : 'region',
code = type == 'region' ? jvm.$(this).attr('data-code') : jvm.$(this).attr('data-index'),
@@ -377,11 +377,11 @@ jvm.WorldMap.prototype = {
}
});
- this.container.delegate('.jvectormap-region, .jvectormap-marker', 'mousedown', function(e){
+ this.container.delegate('.jvectormap-element', 'mousedown', function(e){
mouseMoved = false;
});
- this.container.delegate('.jvectormap-region, .jvectormap-marker', 'mouseup', function(e){
+ this.container.delegate('.jvectormap-element', 'mouseup', function(e){
var path = this,
type = jvm.$(this).attr('class').indexOf('jvectormap-region') === -1 ? 'marker' : 'region',
code = type == 'region' ? jvm.$(this).attr('data-code') : jvm.$(this).attr('data-index'),
@@ -604,7 +604,7 @@ jvm.WorldMap.prototype = {
jvm.$(region.node).bind('selected', function(e, isSelected){
map.container.trigger('regionSelected.jvectormap', [jvm.$(this).attr('data-code'), isSelected, map.getSelectedRegions()]);
});
- region.addClass('jvectormap-region');
+ region.addClass('jvectormap-region jvectormap-element');
this.regions[key] = {
element: region,
config: this.mapData.paths[key]
@@ -639,7 +639,7 @@ jvm.WorldMap.prototype = {
cx: point.x,
cy: point.y
}, jvm.$.extend(true, {}, this.params.markerStyle, {initial: markerConfig.style || {}}), this.markersGroup);
- marker.addClass('jvectormap-marker');
+ marker.addClass('jvectormap-marker jvectormap-element');
jvm.$(marker.node).bind('selected', function(e, isSelected){
map.container.trigger('markerSelected.jvectormap', [jvm.$(this).attr('data-index'), isSelected, map.getSelectedMarkers()]);
});
View
1  tests/markers.html
@@ -88,7 +88,6 @@
},
regionsSelectable: true,
markersSelectable: true,
- regionsSelectableOne: true,
markersSelectableOne: true,
selectedRegions: JSON.parse( window.localStorage.getItem('jvectormap-selected-regions') || '[]' ),
selectedMarkers: JSON.parse( window.localStorage.getItem('jvectormap-selected-markers') || '[]' ),
Please sign in to comment.
Something went wrong with that request. Please try again.