{"version":3,"file":null,"sources":["src/Annotation.js","src/AnnotationCollection.js","src/Types-d3.js","src/Adapter-d3.js","index.js"],"sourcesContent":["\nexport default class Annotation {\n constructor({ x, y, dy, dx, text, title, data, type }) {\n //super() calls parent's constructor\n this.x = x || 0\n this.y = y || 0\n this.dx = dx || 0\n this.dy = dy || 0\n this.text = text\n this.title = title\n this.type = type\n this.data = data || {}\n }\n\n get position() { return { x: this.x, y: this.y }}\n\n set position({ x, y }) {\n this.x = x\n this.y = y\n }\n\n get offset() { return { x: this.dx, y: this.dy }}\n\n set offset({ x, y }) {\n this.dx = x\n this.dy = y\n }\n\n get translation() {\n return {\n x: this.x + this.dx,\n y: this.y + this.dy\n }}\n\n get json() { return {\n x: this.x,\n y: this.y,\n dx: this.dx,\n dy: this.dy,\n text: this.text,\n title: this.title,\n data: this.data\n }}\n}\n","export default class AnnotationCollection {\n\n constructor({ annotations, accessors }) {\n this.annotations = annotations\n this.accessors = accessors\n }\n\n get json() {\n return this.annotations.map(a => a.json)\n }\n\n // get annotations() {\n // return\n // }\n}\n","import { select, event } from 'd3-selection'\nimport { drag } from 'd3-drag'\n\nfunction manageEnter(a, d, type, className){\n a.selectAll(`${type}.${className}`)\n .data(d)\n .enter()\n .append(type)\n .attr('class', className)\n .merge(a)\n\n return a\n}\n\n\nexport const drawEach = (group, collection) => {\n manageEnter(group, collection.annotations, 'g', 'annotation')\n group.selectAll('g.annotation')\n .attr('transform', d => {\n const translation = d.translation\n return `translate(${translation.x}, ${translation.y})`\n })\n\n return group.selectAll('g.annotation')\n}\n\nfunction dragstarted(d) {\n event.sourceEvent.stopPropagation();\n select(this).classed(\"dragging\", true)\n}\n\nfunction dragged(d) {\n d.type.update(select(this), d)\n}\n\nfunction dragended(d) {\n select(this).classed(\"dragging\", false);\n}\n\nconst drawText = (a, d) => {\n a.select('text.annotation-text')\n .text(d.text)\n\n if (d.title){\n a.select('text.annotation-title')\n .text(d.title)\n .attr('y', -10)\n }\n\n const bbox = a.select('g.annotation-text').node().getBBox();\n const textBBox = a.select('text.annotation-text').node().getBBox();\n\n a.select('text.annotation-text')\n .attr('y', d => {\n if (d.title || d.dy && d.dy > 0) {\n return 5 + textBBox.height\n }\n return -10\n })\n\n return bbox\n}\n\nconst drawConnectorLine = (a, d, bbox) => {\n a.select('line.connector')\n .attr('x2', -d.dx || 0)\n .attr('y2', -d.dy || 0)\n .attr('x1', () => {\n if (d.dx && d.dx < 0 && Math.abs(d.dx) > bbox.width/2) {\n return bbox.width\n }\n })\n}\n\nconst drawUnderline = (a, bbox) => {\n a.select('line.underline')\n .attr('x1', bbox.x)\n .attr('x2', bbox.x + bbox.width);\n}\n\nconst drawLine = (a, d) => {\n a.select('line.threshold')\n .attr(d.x ? 'x1' : 'y1', )\n .attr(d.x ? 'x2' : 'y2', )\n}\n\nconst editable = (a, editMode) => {\n if (editMode) {\n a.call(drag()\n .on('start', dragstarted)\n .on('drag', dragged)\n .on('end', dragended)\n )\n }\n}\n\nexport const d3Callout = {\n draw: (a, d, editMode) => {\n manageEnter(a, [d], 'g', 'annotation-text')\n manageEnter(a.select('g.annotation-text'), [d], 'text', 'annotation-text')\n manageEnter(a.select('g.annotation-text'), [d], 'text', 'annotation-title')\n\n const textBBox = drawText(a, d)\n drawUnderline(manageEnter(a, [textBBox], 'line', 'underline'), textBBox)\n drawConnectorLine(manageEnter(a, [d], 'line', 'connector'), d, textBBox)\n editable(a, editMode)\n },\n update: (a, d) => {\n const offset = d.offset\n offset.x += event.dx\n offset.y += event.dy\n d.offset = offset\n const translate = d.translation\n a.attr('transform', d => `translate(${translate.x}, ${translate.y})`)\n\n const bbox = drawText(a, d)\n drawConnectorLine(a, d, bbox)\n drawUnderline(a, bbox)\n }\n}\n\nexport const d3XYThreshold = {\n draw: (a, d, editMode) => {\n console.log('here')\n drawLine(manageEnter(a, [d], 'line', 'threshold'))\n }\n}\n\n//TODO\n//const drawConnectorElbow = () => {}\n//Add text wraping option\n//Create threshold annotation\n//Create threshold range annotation\n//Example to use with divided line\n\nexport default {\n d3Callout,\n d3XYThreshold\n}\n","// import { Annotation, AnnotationCollection } from 'viz-annotation'\nimport Annotation from './Annotation'\nimport AnnotationCollection from './AnnotationCollection'\nimport { drawEach, d3Callout } from './Types-d3'\nimport { select } from 'd3-selection'\n\nexport default function annotation(){\n //declare internal variables\n let annotations = [],\n collection,\n accessors= {},\n editMode = false,\n type= d3Callout;\n\n //drawing an annotation in d3\n const annotation = function(selection){\n const translatedAnnotations = annotations\n .map(a => {\n console.log('a', a)\n if (!a.x && a.data && accessors.x){ a.x = accessors.x(a.data) }\n if (!a.y && a.data && accessors.y){ a.y = accessors.y(a.data) }\n if (!a.type) { console.log('no type'); a.type = type }\n return new Annotation(a)\n });\n\n\n collection = new AnnotationCollection ({\n annotations: translatedAnnotations,\n accessors\n })\n\n const annotationG = selection.selectAll('g').data([collection])\n annotationG.enter().append('g').attr('class', 'annotations')\n\n const group = drawEach(selection.select('g.annotations'), collection)\n group.each(function(d) { d.type.draw(select(this), d, editMode)})\n\n }\n\n //TODO: add in classprefix functionality\n annotation.type = function(_) {\n if (!arguments.length) return type;\n type = _;\n return annotation;\n }\n\n annotation.annotations = function(_) {\n if (!arguments.length) return collection && collection.annotations || annotations;\n annotations = _\n return annotation;\n };\n\n annotation.accessors = function(_) {\n if (!arguments.length) return accessors;\n accessors = _;\n return annotation\n }\n\n annotation.editMode = function(_) {\n if (!arguments.length) return editMode;\n editMode = _\n return annotation\n }\n\n return annotation;\n\n};\n","import annotation from './src/Adapter-d3'\nimport types from './src/Types-d3'\n\nexport default {\n annotation,\n annotationCallout : types.d3Callout,\n annotationXYThreshold : types.d3XYThreshold\n}\n"],"names":["Annotation","x","y","dy","dx","text","title","data","type","AnnotationCollection","annotations","accessors","map","a","json","manageEnter","d","className","selectAll","enter","append","attr","merge","drawEach","group","collection","translation","dragstarted","event","sourceEvent","stopPropagation","select","classed","dragged","update","dragended","drawText","bbox","node","getBBox","textBBox","height","drawConnectorLine","Math","abs","width","drawUnderline","drawLine","editable","editMode","call","drag","on","d3Callout","draw","offset","translate","d3XYThreshold","console","log","annotation","selection","translatedAnnotations","annotationG","each","_","arguments","length","annotationCallout","types","annotationXYThreshold"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACqBA;AACnB,EAAA,4BAAuD;AAAA,EAAA,QAAzCC,CAAyC,QAAzCA,CAAyC;AAAA,EAAA,QAAtCC,CAAsC,QAAtCA,CAAsC;AAAA,EAAA,QAAnCC,EAAmC,QAAnCA,EAAmC;AAAA,EAAA,QAA/BC,EAA+B,QAA/BA,EAA+B;AAAA,EAAA,QAA3BC,IAA2B,QAA3BA,IAA2B;AAAA,EAAA,QAArBC,KAAqB,QAArBA,KAAqB;AAAA,EAAA,QAAdC,IAAc,QAAdA,IAAc;AAAA,EAAA,QAARC,IAAQ,QAARA,IAAQ;AAAA,EAAA;;AACrD,EAAA;AACA,EAAA,SAAKP,CAAL,GAASA,KAAK,CAAd;AACA,EAAA,SAAKC,CAAL,GAASA,KAAK,CAAd;AACA,EAAA,SAAKE,EAAL,GAAUA,MAAM,CAAhB;AACA,EAAA,SAAKD,EAAL,GAAUA,MAAM,CAAhB;AACA,EAAA,SAAKE,IAAL,GAAYA,IAAZ;AACA,EAAA,SAAKC,KAAL,GAAaA,KAAb;AACA,EAAA,SAAKE,IAAL,GAAYA,IAAZ;AACA,EAAA,SAAKD,IAAL,GAAYA,QAAQ,EAApB;AACD,EAAA;;;;0BAEc;AAAE,EAAA,aAAO,EAAEN,GAAG,KAAKA,CAAV,EAAaC,GAAG,KAAKA,CAArB,EAAP;AAAgC,EAAA;+BAE1B;AAAA,EAAA,UAARD,CAAQ,SAARA,CAAQ;AAAA,EAAA,UAALC,CAAK,SAALA,CAAK;;AACrB,EAAA,WAAKD,CAAL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