@flourish/controls
Advanced tools
Comparing version 8.0.6 to 8.0.7
{ | ||
"name": "@flourish/controls", | ||
"version": "8.0.6", | ||
"version": "8.0.7", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Switchable dropdown/buttons/slider control", |
@@ -58,2 +58,8 @@ # Flourish controls | ||
You can add an id string to a control using the second argument: | ||
```js | ||
var buttons_control = createControls(state.buttons_control, "fl-buttons-control"); | ||
``` | ||
Add an on change handler to each controls instance: `buttons_control.on("change", update);`. This is usually done in the `draw` function. | ||
@@ -60,0 +66,0 @@ |
@@ -0,1 +1,4 @@ | ||
# 8.0.7 | ||
* Add id argument to createControls | ||
# 8.0.6 | ||
@@ -2,0 +5,0 @@ * Update setting descriptions and add links |
@@ -51,3 +51,3 @@ import { select } from "d3-selection"; | ||
function createControls(state) { | ||
function createControls(state, id) { | ||
var control_obj = {}; | ||
@@ -62,2 +62,3 @@ var parser = defaultParser; | ||
var container = document.createElement("div"); | ||
if (id) container.setAttribute("id", id); | ||
container.setAttribute("class", "fl-controls-container"); | ||
@@ -64,0 +65,0 @@ var container_title = select(container).append("div").attr("class", "fl-controls-title"); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
208808
173
0
21
3659