Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fishawack/lab-d3

Package Overview
Dependencies
Maintainers
0
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fishawack/lab-d3 - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

2

package.json
{
"name": "@fishawack/lab-d3",
"version": "4.2.0",
"version": "4.2.1",
"description": "Abstract layer built on top of d3",

@@ -5,0 +5,0 @@ "scripts": {

@@ -97,2 +97,10 @@ "use strict";

}
local.select.call(this, d, options);
},
select: function select(d) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var local = that.store,
att = local.att,
data = local.data,
chart = local.chart;
local.active = d;

@@ -280,3 +288,5 @@ local.activated.push(d);

// Setup features
var selection = local.geometry.selectAll(".feature").data(local.geoJson.features);
var selection = local.geometry.selectAll(".feature").data(local.geoJson.features, function (d) {
return d.id;
});
var enter = selection.enter().append('g').attr('class', function (d) {

@@ -556,2 +566,7 @@ return 'feature feature-' + d.id;

att = local.att;
for (var i = 0; i < local.activated.length; i++) {
if (local.activated[i].id === key) {
return;
}
}
var d;

@@ -565,2 +580,18 @@ for (var i = local.geoJson.features.length; i--;) {

if (d) {
local.select.call(d3.select('.feature-' + key).node(), d, {
programmatic: true
});
}
};
Chart_Map.prototype.toggleSpecific = function (key) {
var local = this.store,
att = local.att;
var d;
for (var i = local.geoJson.features.length; i--;) {
if (local.geoJson.features[i].id === key) {
d = local.geoJson.features[i];
break;
}
}
if (d) {
local.clicked.call(d3.select('.feature-' + key).node(), d, {

@@ -567,0 +598,0 @@ options: {

@@ -352,7 +352,11 @@ "use strict";

var prevColor = node.attr('data-color');
node.classed(prevColor, false);
var newColor = d && index > -1 && Shared.getKey(att, d, index, 'colors');
node.classed(newColor, true).attr('data-color', newColor);
if (!newColor || newColor !== prevColor) {
node.classed(prevColor, false);
if (newColor) {
node.classed(newColor, true).attr('data-color', newColor);
}
}
}
};
export default Shared;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc