Comparing version 0.0.20 to 0.0.21
@@ -1,2 +0,2 @@ | ||
// https://github.com/HarryStevens/d3-arrow#readme Version 0.0.20. Copyright 2020 Harry Stevens. | ||
// https://github.com/HarryStevens/d3-arrow#readme Version 0.0.21. Copyright 2020 Harry Stevens. | ||
(function (global, factory) { | ||
@@ -31,3 +31,4 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
var attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -38,3 +39,3 @@ var id = "d3-arrow-1"; | ||
function arrow(context) { | ||
draw(context, attrs, id, scale, 14, 9, "M 1 1 Q ".concat(8 * scale, " ").concat(6 * scale, " ").concat(16 * scale, " ").concat(9 * scale, " Q ").concat(8 * scale, " ").concat(12 * scale, " 1 ").concat(17 * scale, " L ").concat(4 * scale, " ").concat(9 * scale, " Z")); | ||
draw(context, attrs, id, scale, 15, 8, "M 1 1 Q ".concat(7 * scale, " ").concat(5 * scale, " ").concat(16 * scale, " ").concat(8 * scale, " Q ").concat(7 * scale, " ").concat(11 * scale, " 1 ").concat(15 * scale, " L ").concat(4 * scale, " ").concat(8 * scale, " Z")); | ||
} | ||
@@ -59,3 +60,4 @@ | ||
var attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -66,3 +68,3 @@ var id = "d3-arrow-2"; | ||
function arrow(context) { | ||
draw(context, attrs, id, scale, 17, 8, "M 1 1 L ".concat(20 * scale, " ").concat(8 * scale, " L 1 ").concat(15 * scale, " L ").concat(4 * scale, " ").concat(8 * scale, " z")); | ||
draw(context, attrs, id, scale, 17, 7, "M 1 1 L ".concat(18 * scale, " ").concat(7 * scale, " L 1 ").concat(13 * scale, " L ").concat(5 * scale, " ").concat(7 * scale, " z")); | ||
} | ||
@@ -87,3 +89,4 @@ | ||
var attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -94,3 +97,3 @@ var id = "d3-arrow-5"; | ||
function arrow(context) { | ||
draw(context, attrs, id, scale, 14, 8, "M 1 1 L ".concat(16 * scale, " ").concat(8 * scale, " L 1 ").concat(15 * scale, " L ").concat(3.5 * scale, " ").concat(8 * scale, " z")); | ||
draw(context, attrs, id, scale, 14, 7, "M 1 1 L ".concat(15 * scale, " ").concat(7 * scale, " L 1 ").concat(13 * scale, " L ").concat(3 * scale, " ").concat(7 * scale, " z")); | ||
} | ||
@@ -202,2 +205,3 @@ | ||
exports.arrow2 = arrow2; | ||
exports.arrow3 = arrow2; | ||
exports.arrow5 = arrow5; | ||
@@ -204,0 +208,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):(t=t||self,n(t.d3=t.d3||{}))}(this,function(t){"use strict";function n(t,n){for(var r=Object.keys(t),c=r.length,e=0;e<c;e++){var o=r[e];n.attr(o,t[o])}}function r(t,r,c,e,o,a,u){var i=t.select("defs");i.empty()&&(i=t.append("defs")),n(r,i.append("marker").attr("id",c).attr("refX",o*e).attr("refY",a*e).attr("markerWidth",o+2*e).attr("markerHeight",2*a*e).attr("markerUnits","userSpaceOnUse").attr("orient","auto-start-reverse").append("path").attr("d",u))}function c(){function t(t){r(t,n,c,e,14,9,"M 1 1 Q ".concat(8*e," ").concat(6*e," ").concat(16*e," ").concat(9*e," Q ").concat(8*e," ").concat(12*e," 1 ").concat(17*e," L ").concat(4*e," ").concat(9*e," Z"))}var n={fill:"black"},c="d3-arrow-1",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function e(){function t(t){r(t,n,c,e,17,8,"M 1 1 L ".concat(20*e," ").concat(8*e," L 1 ").concat(15*e," L ").concat(4*e," ").concat(8*e," z"))}var n={fill:"black"},c="d3-arrow-2",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function o(){function t(t){r(t,n,c,e,14,8,"M 1 1 L ".concat(16*e," ").concat(8*e," L 1 ").concat(15*e," L ").concat(3.5*e," ").concat(8*e," z"))}var n={fill:"black"},c="d3-arrow-5",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function a(){function t(t){r(t,n,c,e,5,4.5,"M 1 1 L ".concat(5*e," ").concat(4.5*e," L 1 ").concat(8*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function u(){function t(t){r(t,n,c,e,8,8,"M 1 1 L ".concat(8*e," ").concat(8*e," L 1 ").concat(15*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function i(){function t(t){r(t,n,c,e,13,10,"M 1 1 L ".concat(13*e," ").concat(10*e," L 1 ").concat(19*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}t.arrow1=c,t.arrow10=a,t.arrow11=u,t.arrow13=i,t.arrow2=e,t.arrow5=o,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):(t=t||self,n(t.d3=t.d3||{}))}(this,function(t){"use strict";function n(t,n){for(var r=Object.keys(t),c=r.length,e=0;e<c;e++){var o=r[e];n.attr(o,t[o])}}function r(t,r,c,e,o,a,u){var i=t.select("defs");i.empty()&&(i=t.append("defs")),n(r,i.append("marker").attr("id",c).attr("refX",o*e).attr("refY",a*e).attr("markerWidth",o+2*e).attr("markerHeight",2*a*e).attr("markerUnits","userSpaceOnUse").attr("orient","auto-start-reverse").append("path").attr("d",u))}function c(){function t(t){r(t,n,c,e,15,8,"M 1 1 Q ".concat(7*e," ").concat(5*e," ").concat(16*e," ").concat(8*e," Q ").concat(7*e," ").concat(11*e," 1 ").concat(15*e," L ").concat(4*e," ").concat(8*e," Z"))}var n={fill:"black",stroke:"black"},c="d3-arrow-1",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function e(){function t(t){r(t,n,c,e,17,7,"M 1 1 L ".concat(18*e," ").concat(7*e," L 1 ").concat(13*e," L ").concat(5*e," ").concat(7*e," z"))}var n={fill:"black",stroke:"black"},c="d3-arrow-2",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function o(){function t(t){r(t,n,c,e,14,7,"M 1 1 L ".concat(15*e," ").concat(7*e," L 1 ").concat(13*e," L ").concat(3*e," ").concat(7*e," z"))}var n={fill:"black",stroke:"black"},c="d3-arrow-5",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function a(){function t(t){r(t,n,c,e,5,4.5,"M 1 1 L ".concat(5*e," ").concat(4.5*e," L 1 ").concat(8*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function u(){function t(t){r(t,n,c,e,8,8,"M 1 1 L ".concat(8*e," ").concat(8*e," L 1 ").concat(15*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}function i(){function t(t){r(t,n,c,e,13,10,"M 1 1 L ".concat(13*e," ").concat(10*e," L 1 ").concat(19*e))}var n={fill:"none",stroke:"black","stroke-width":1},c="d3-arrow-10",e=1;return t.id=function(n){return arguments.length?(c=n,t):c},t.scale=function(n){return arguments.length?(e=n,t):e},t.attr=function(r,c){return 2===arguments.length?(n[r]=c,t):n[r]},t}t.arrow1=c,t.arrow10=a,t.arrow11=u,t.arrow13=i,t.arrow2=e,t.arrow3=e,t.arrow5=o,Object.defineProperty(t,"__esModule",{value:!0})}); |
export {default as arrow1} from "./src/arrow-1"; | ||
export {default as arrow2} from "./src/arrow-2"; | ||
export {default as arrow3} from "./src/arrow-2"; | ||
export {default as arrow5} from "./src/arrow-5"; | ||
@@ -4,0 +5,0 @@ export {default as arrow10} from "./src/arrow-10"; |
{ | ||
"name": "d3-arrow", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"description": "Attach arrowheads to SVG elements.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ # d3-arrow | ||
```html | ||
<script src="https://unpkg.com/d3-arrow@0.0.20/dist/d3-arrow.min.js"></script> | ||
<script src="https://unpkg.com/d3-arrow@0.0.21/dist/d3-arrow.min.js"></script> | ||
<script> | ||
@@ -29,3 +29,4 @@ | ||
.id("my-arrow") | ||
.attr("fill", "steelblue"); | ||
.attr("fill", "steelblue") | ||
.attr("stroke", "steelblue"); | ||
@@ -32,0 +33,0 @@ svg.call(arrow); |
@@ -5,3 +5,4 @@ import { draw } from "./utils/draw"; | ||
let attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -17,5 +18,5 @@ let id = "d3-arrow-1"; | ||
scale, | ||
14, | ||
9, | ||
`M 1 1 Q ${8 * scale} ${6 * scale} ${16 * scale} ${9 * scale} Q ${8 * scale} ${12 * scale} 1 ${17 * scale} L ${4 * scale} ${9 * scale} Z` | ||
15, | ||
8, | ||
`M 1 1 Q ${7 * scale} ${5 * scale} ${16 * scale} ${8 * scale} Q ${7 * scale} ${11 * scale} 1 ${15 * scale} L ${4 * scale} ${8 * scale} Z` | ||
); | ||
@@ -22,0 +23,0 @@ } |
@@ -5,3 +5,4 @@ import { draw } from "./utils/draw"; | ||
let attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -18,4 +19,4 @@ let id = "d3-arrow-2"; | ||
17, | ||
8, | ||
`M 1 1 L ${20 * scale} ${8 * scale} L 1 ${15 * scale} L ${4 * scale} ${8 * scale} z` | ||
7, | ||
`M 1 1 L ${18 * scale} ${7 * scale} L 1 ${13 * scale} L ${5 * scale} ${7 * scale} z` | ||
); | ||
@@ -22,0 +23,0 @@ } |
@@ -5,3 +5,4 @@ import { draw } from "./utils/draw"; | ||
let attrs = { | ||
fill: "black" | ||
fill: "black", | ||
stroke: "black" | ||
}; | ||
@@ -18,4 +19,4 @@ let id = "d3-arrow-5"; | ||
14, | ||
8, | ||
`M 1 1 L ${16 * scale} ${8 * scale} L 1 ${15 * scale} L ${3.5 * scale} ${8 * scale} z` | ||
7, | ||
`M 1 1 L ${15 * scale} ${7 * scale} L 1 ${13 * scale} L ${3 * scale} ${7 * scale} z` | ||
); | ||
@@ -22,0 +23,0 @@ } |
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
22298
17
368
78