完成世界书、骰子、apiconfig页面处理
This commit is contained in:
12
frontend/node_modules/d3-selection/src/matcher.js
generated
vendored
Normal file
12
frontend/node_modules/d3-selection/src/matcher.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export default function(selector) {
|
||||
return function() {
|
||||
return this.matches(selector);
|
||||
};
|
||||
}
|
||||
|
||||
export function childMatcher(selector) {
|
||||
return function(node) {
|
||||
return node.matches(selector);
|
||||
};
|
||||
}
|
||||
|
||||
20
frontend/node_modules/d3-selection/src/pointer.js
generated
vendored
Normal file
20
frontend/node_modules/d3-selection/src/pointer.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import sourceEvent from "./sourceEvent.js";
|
||||
|
||||
export default function(event, node) {
|
||||
event = sourceEvent(event);
|
||||
if (node === undefined) node = event.currentTarget;
|
||||
if (node) {
|
||||
var svg = node.ownerSVGElement || node;
|
||||
if (svg.createSVGPoint) {
|
||||
var point = svg.createSVGPoint();
|
||||
point.x = event.clientX, point.y = event.clientY;
|
||||
point = point.matrixTransform(node.getScreenCTM().inverse());
|
||||
return [point.x, point.y];
|
||||
}
|
||||
if (node.getBoundingClientRect) {
|
||||
var rect = node.getBoundingClientRect();
|
||||
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
|
||||
}
|
||||
}
|
||||
return [event.pageX, event.pageY];
|
||||
}
|
||||
7
frontend/node_modules/d3-selection/src/select.js
generated
vendored
Normal file
7
frontend/node_modules/d3-selection/src/select.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import {Selection, root} from "./selection/index.js";
|
||||
|
||||
export default function(selector) {
|
||||
return typeof selector === "string"
|
||||
? new Selection([[document.querySelector(selector)]], [document.documentElement])
|
||||
: new Selection([[selector]], root);
|
||||
}
|
||||
3
frontend/node_modules/d3-selection/src/selection/empty.js
generated
vendored
Normal file
3
frontend/node_modules/d3-selection/src/selection/empty.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function() {
|
||||
return !this.node();
|
||||
}
|
||||
6
frontend/node_modules/d3-selection/src/selection/exit.js
generated
vendored
Normal file
6
frontend/node_modules/d3-selection/src/selection/exit.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import sparse from "./sparse.js";
|
||||
import {Selection} from "./index.js";
|
||||
|
||||
export default function() {
|
||||
return new Selection(this._exit || this._groups.map(sparse), this._parents);
|
||||
}
|
||||
13
frontend/node_modules/d3-selection/src/selection/order.js
generated
vendored
Normal file
13
frontend/node_modules/d3-selection/src/selection/order.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export default function() {
|
||||
|
||||
for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
|
||||
for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
|
||||
if (node = group[i]) {
|
||||
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
||||
next = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
35
frontend/node_modules/d3-selection/src/selection/style.js
generated
vendored
Normal file
35
frontend/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);
|
||||
}
|
||||
9
frontend/node_modules/d3-selection/src/selectorAll.js
generated
vendored
Normal file
9
frontend/node_modules/d3-selection/src/selectorAll.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
function empty() {
|
||||
return [];
|
||||
}
|
||||
|
||||
export default function(selector) {
|
||||
return selector == null ? empty : function() {
|
||||
return this.querySelectorAll(selector);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user