Implemented 2D visualization for notes using Vue Flow
This commit is contained in:
35
node_modules/d3-selection/src/selection/style.js
generated
vendored
Normal file
35
node_modules/d3-selection/src/selection/style.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import defaultView from "../window.js";
|
||||
|
||||
function styleRemove(name) {
|
||||
return function() {
|
||||
this.style.removeProperty(name);
|
||||
};
|
||||
}
|
||||
|
||||
function styleConstant(name, value, priority) {
|
||||
return function() {
|
||||
this.style.setProperty(name, value, priority);
|
||||
};
|
||||
}
|
||||
|
||||
function styleFunction(name, value, priority) {
|
||||
return function() {
|
||||
var v = value.apply(this, arguments);
|
||||
if (v == null) this.style.removeProperty(name);
|
||||
else this.style.setProperty(name, v, priority);
|
||||
};
|
||||
}
|
||||
|
||||
export default function(name, value, priority) {
|
||||
return arguments.length > 1
|
||||
? this.each((value == null
|
||||
? styleRemove : typeof value === "function"
|
||||
? styleFunction
|
||||
: styleConstant)(name, value, priority == null ? "" : priority))
|
||||
: styleValue(this.node(), name);
|
||||
}
|
||||
|
||||
export function styleValue(node, name) {
|
||||
return node.style.getPropertyValue(name)
|
||||
|| defaultView(node).getComputedStyle(node, null).getPropertyValue(name);
|
||||
}
|
||||
Reference in New Issue
Block a user