Skip to content

Commit

Permalink
Fixed #5694 for mapbubbles as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
oysteinmoseng authored and TorsteinHonsi committed Sep 22, 2016
1 parent 643d9ef commit 8ca82c9
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 6 deletions.
3 changes: 1 addition & 2 deletions js/highmaps.src.js
Expand Up @@ -19327,8 +19327,7 @@
applyOptions: function (options, x) {
var point;
if (options && options.lat !== undefined && options.lon !== undefined) {
point = Point.prototype.applyOptions.call(this, options, x);
point = extend(point, this.series.chart.fromLatLonToPoint(point));
point = Point.prototype.applyOptions.call(this, merge(options, this.series.chart.fromLatLonToPoint(options)), x);
} else {
point = MapAreaPoint.prototype.applyOptions.call(this, options, x);
}
Expand Down
3 changes: 1 addition & 2 deletions js/modules/map.src.js
Expand Up @@ -1780,8 +1780,7 @@
applyOptions: function (options, x) {
var point;
if (options && options.lat !== undefined && options.lon !== undefined) {
point = Point.prototype.applyOptions.call(this, options, x);
point = extend(point, this.series.chart.fromLatLonToPoint(point));
point = Point.prototype.applyOptions.call(this, merge(options, this.series.chart.fromLatLonToPoint(options)), x);
} else {
point = MapAreaPoint.prototype.applyOptions.call(this, options, x);
}
Expand Down
3 changes: 1 addition & 2 deletions js/parts-map/MapBubbleSeries.js
Expand Up @@ -14,8 +14,7 @@ if (seriesTypes.bubble) {
applyOptions: function (options, x) {
var point;
if (options && options.lat !== undefined && options.lon !== undefined) {
point = Point.prototype.applyOptions.call(this, options, x);
point = extend(point, this.series.chart.fromLatLonToPoint(point));
point = Point.prototype.applyOptions.call(this, merge(options, this.series.chart.fromLatLonToPoint(options)), x);
} else {
point = MapAreaPoint.prototype.applyOptions.call(this, options, x);
}
Expand Down
5 changes: 5 additions & 0 deletions samples/unit-tests/maps/mapbubble-linewidth/demo.details
@@ -0,0 +1,5 @@
---
resources:
- https://code.jquery.com/qunit/qunit-1.19.0.js
- https://code.jquery.com/qunit/qunit-1.19.0.css
...
8 changes: 8 additions & 0 deletions samples/unit-tests/maps/mapbubble-linewidth/demo.html
@@ -0,0 +1,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.6/proj4.js"></script>
<script src="https://code.highcharts.com/highmaps.js"></script>
<script src="https://code.highcharts.com/mapdata/countries/gb/gb-all.js"></script>

<div id="qunit"></div>
<div id="qunit-fixture"></div>

<div id="container" style="width: 600px; margin: 0 auto"></div>
34 changes: 34 additions & 0 deletions samples/unit-tests/maps/mapbubble-linewidth/demo.js
@@ -0,0 +1,34 @@
$(function () {
// This should maybe be a visual test
QUnit.test('MapBubble with LineWidth', function (assert) {
var chart = Highcharts.mapChart('container', {
series: [{
mapData: Highcharts.maps['countries/gb/gb-all']
}, {
type: 'mapbubble',
lineWidth: 2,
data: [{
lat: 51.507222,
lon: -0.1275,
z: 3
}, {
lat: 52.483056,
lon: -1.893611,
z: 4
}, {
x: 1600,
y: -3500,
z: 3
}, {
x: 2800,
y: -3800,
z: 1
}]
}]
});
assert.strictEqual(chart.series[1].graph['stroke-width'],
2,
'Points have stroke width'
);
});
});

0 comments on commit 8ca82c9

Please sign in to comment.