@vizabi/bubblechart 5.2.3 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bubblechart.js +34 -26
- package/build/bubblechart.js.map +1 -1
- package/build/stats.html +1 -1
- package/package.json +1 -1
package/build/bubblechart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// https://github.com/vizabi/bubblechart#readme v5.
|
|
1
|
+
// https://github.com/vizabi/bubblechart#readme v5.3.0 build 1750548202909 Copyright 2025 Gapminder Foundation and contributors
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@vizabi/shared-components'), require('d3'), require('mobx')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', '@vizabi/shared-components', 'd3', 'mobx'], factory) :
|
|
@@ -44465,6 +44465,7 @@ void main(void) {
|
|
|
44465
44465
|
this.DOM.canvasWrap.select("canvas")
|
|
44466
44466
|
.call(this._panZoom.dragRectangle)
|
|
44467
44467
|
.call(this._panZoom.zoomer)
|
|
44468
|
+
.on("contextmenu", (evt) => evt.preventDefault())
|
|
44468
44469
|
.on("dblclick.zoom", null)
|
|
44469
44470
|
.on("mouseup", () => {
|
|
44470
44471
|
_this.draggingNow = false;
|
|
@@ -45730,34 +45731,35 @@ void main(void) {
|
|
|
45730
45731
|
//}, 0);
|
|
45731
45732
|
}
|
|
45732
45733
|
},
|
|
45733
|
-
onClick: ({ object:d, index }) => {
|
|
45734
|
-
//console.log("onclick", d, this.activeObject);
|
|
45734
|
+
onClick: ({ object:d, index }, event) => {
|
|
45735
45735
|
if (!d) return;
|
|
45736
|
-
//
|
|
45736
|
+
//invisible bubbles should not react to clicks
|
|
45737
45737
|
if (this._getBubbleOpacity(d) == 0) return;
|
|
45738
|
-
|
|
45739
|
-
|
|
45740
|
-
|
|
45741
|
-
|
|
45742
|
-
const
|
|
45743
|
-
|
|
45744
|
-
|
|
45738
|
+
//no reaction on trail bubbles either
|
|
45739
|
+
if (d[TRAIL_KEY]) return;
|
|
45740
|
+
|
|
45741
|
+
mobx.runInAction(() => {
|
|
45742
|
+
const dataKey = {[KEY] : d[KEY]};
|
|
45743
|
+
|
|
45744
|
+
if (event.rightButton) {
|
|
45745
|
+
dataKey.name = this.__labelWithoutFrame(d);
|
|
45746
|
+
const margin = this.profileConstants.margin;
|
|
45747
|
+
const toolNode = this.element.node();
|
|
45748
|
+
const x = (this.width - event.offsetCenter.x) < 250 ? this.width - 250 : event.offsetCenter.x - 5;
|
|
45749
|
+
|
|
45750
|
+
//set context menu
|
|
45751
|
+
const contextMenuComponent = this.root.findChild({type: "MarkerContextmenu"});
|
|
45752
|
+
contextMenuComponent.show(dataKey, {
|
|
45753
|
+
x: toolNode.offsetLeft + x + margin.left * this.profileConstants.leftMarginRatio,
|
|
45754
|
+
y: toolNode.offsetTop + event.offsetCenter.y + margin.top - 5
|
|
45755
|
+
});
|
|
45745
45756
|
} else {
|
|
45746
|
-
dataKey
|
|
45757
|
+
this.MDL.selected.data.filter.toggle(dataKey);
|
|
45747
45758
|
}
|
|
45748
|
-
}
|
|
45749
|
-
|
|
45750
|
-
|
|
45751
|
-
|
|
45752
|
-
console.log("click toggle", dataKey);
|
|
45753
|
-
});
|
|
45754
|
-
//this.activeObject = d;
|
|
45755
|
-
//if (invalidate) {
|
|
45756
|
-
//setTimeout(() => {
|
|
45757
|
-
//console.log("invalidate", d, this.activeObject);
|
|
45758
|
-
this.deckBubble.setProps({layers: this.getBubbleLayers(undefined, false, 0, false)});
|
|
45759
|
-
//}, 0);
|
|
45760
|
-
//}
|
|
45759
|
+
});
|
|
45760
|
+
|
|
45761
|
+
// not sure why this is needed? -- angie
|
|
45762
|
+
//this.deckBubble.setProps({layers: this.getBubbleLayers(undefined, false, 0, false)})
|
|
45761
45763
|
},
|
|
45762
45764
|
}
|
|
45763
45765
|
}
|
|
@@ -46168,6 +46170,11 @@ void main(void) {
|
|
|
46168
46170
|
placeholder: ".vzb-treemenu",
|
|
46169
46171
|
model: marker,
|
|
46170
46172
|
name: "tree-menu"
|
|
46173
|
+
},{
|
|
46174
|
+
type: sharedComponents.MarkerContextmenu,
|
|
46175
|
+
placeholder: ".vzb-marker-contextmenu",
|
|
46176
|
+
model: marker,
|
|
46177
|
+
name: "marker-contextmenu"
|
|
46171
46178
|
},{
|
|
46172
46179
|
type: sharedComponents.DataWarning,
|
|
46173
46180
|
placeholder: ".vzb-datawarning",
|
|
@@ -46212,6 +46219,7 @@ void main(void) {
|
|
|
46212
46219
|
<div class="vzb-buttonlist"></div>
|
|
46213
46220
|
</div>
|
|
46214
46221
|
<div class="vzb-treemenu"></div>
|
|
46222
|
+
<div class="vzb-marker-contextmenu"></div>
|
|
46215
46223
|
<div class="vzb-datawarning"></div>
|
|
46216
46224
|
<div class="vzb-spaceconfig"></div>
|
|
46217
46225
|
<div class="vzb-datanotes"></div>
|
|
@@ -46352,7 +46360,7 @@ void main(void) {
|
|
|
46352
46360
|
}
|
|
46353
46361
|
});
|
|
46354
46362
|
|
|
46355
|
-
BubbleChart.versionInfo = { version: "5.
|
|
46363
|
+
BubbleChart.versionInfo = { version: "5.3.0", build: 1750548202909, package: {"homepage":"https://github.com/vizabi/bubblechart#readme","name":"@vizabi/bubblechart","description":"Vizabi bubble chart"}, sharedComponents: sharedComponents.versionInfo};
|
|
46356
46364
|
|
|
46357
46365
|
exports.Base = BubbleChart;
|
|
46358
46366
|
|