Initial commit - dashboard leads
This commit is contained in:
16
frontend/node_modules/d3-shape/src/symbol/diamond.js
generated
vendored
Normal file
16
frontend/node_modules/d3-shape/src/symbol/diamond.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import {sqrt} from "../math.js";
|
||||
|
||||
const tan30 = sqrt(1 / 3);
|
||||
const tan30_2 = tan30 * 2;
|
||||
|
||||
export default {
|
||||
draw(context, size) {
|
||||
const y = sqrt(size / tan30_2);
|
||||
const x = y * tan30;
|
||||
context.moveTo(0, -y);
|
||||
context.lineTo(x, 0);
|
||||
context.lineTo(0, y);
|
||||
context.lineTo(-x, 0);
|
||||
context.closePath();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user