moodle_local_treestudyplan/amd/build/simpleline.min.js.map

1 line
24 KiB
Plaintext

{"version":3,"file":"simpleline.min.js","sources":["../src/simpleline.js"],"sourcesContent":["/*eslint no-console: \"off\"*/\n/*eslint no-trailing-spaces: \"off\"*/\n\nimport {calc} from \"./css-calc\";\n\n\n/**\n * Copies defined properties in to, over from the from object. Does so recursively\n * Used to copy user defined parameters onto a pre-existing object with defaults preset.\n * @param {Object} to The object to copy to\n * @param {Object} from The object tp copy from (but only the properties already named in \"to\")\n */\nconst specsCopy = (to, from) => {\n for(const ix in to){\n if(from.hasOwnProperty(ix)){\n if( typeof to[ix] == \"object\"\n && typeof from[ix] == \"object\")\n {\n if(Array.isArray(to[ix])){\n if(Array.isArray(from[ix])){\n to[ix] = Array.from(from[ix]);\n } // else, skip...\n } else {\n specsCopy(to[ix], from[ix]); // recursive copy\n }\n }\n else {\n to[ix] = from[ix];\n }\n }\n }\n};\n\nconst debounce = (func, delay) => {\n let timer;\n return function(...args) {\n const context = this;\n clearTimeout(timer);\n timer = setTimeout(() => {\n func.apply(context, args);\n }, delay);\n };\n};\n\n/**\n * Get the position of an element relative to another\n * @param {HTMLElement} el The element whose position to determine\n * @param {HTMLElement} reference Relative to this element\n * @returns {object} Position object with {x: ..., y:...}\n */\nconst getElementPosition = (el, reference) => {\n if(!el || !(el instanceof HTMLElement)){\n // Always return 0,0 if the element is invalid\n return {x: 0, y: 0};\n }\n\n if (!reference || !(reference instanceof HTMLElement)){\n // Take the document body as reference if the reference is invalud\n reference = document.querySelector(\"body\");\n }\n\n if( el.offsetParent === reference){\n // easily done if the reference element is also the offsetParent..\n return {x: el.offsetLeft, y: el.offsetTop};\n } else {\n const elR = el.getBoundingClientRect();\n const refR = reference.getBoundingClientRect();\n\n return {x: elR.left - refR.left,\n y: elR.top - refR.top};\n }\n};\n\nexport class SimpleLine {\n static idCounter = 0;\n\n /**\n * Create a new line object\n * \n * @param {HTMLElement|string} start The element the line starts from\n * @param {HTMLElement|string} end The element the line ends at\n * @param {object} config Configuration for the \n * @returns {SimpleLine} object\n */\n constructor(start, end, config){\n this.svg = null;\n this.id = SimpleLine.idCounter++;\n\n this.setConfig(config);\n // Validate start element\n if(start instanceof HTMLElement) {\n this.start = start;\n } else if (typeof start === 'string' || this.start instanceof String) {\n this.startSelector = start;\n this.start = document.querySelector(start);\n if(!(this.start instanceof HTMLElement)){\n console.error(\"Cannot find start element:\",start);\n return;\n }\n } else {\n console.error(\"Start element not string or dom element\",start);\n return;\n }\n\n // Validate end element\n if(end instanceof HTMLElement) {\n this.end = end;\n } else if (typeof end === 'string' || this.end instanceof String) {\n this.endSelector = end;\n this.end = document.querySelector(end);\n if(!(this.end instanceof HTMLElement)){\n console.error(\"Cannot find end element:\",end);\n return;\n }\n } else {\n console.error(\"End element not string or dom element\",start);\n return;\n }\n\n // create observers for both elements\n this.resizeObserver = new ResizeObserver(debounce(() => {\n this.update();\n },20));\n this.resizeObserver.observe(this.start);\n this.resizeObserver.observe(this.end);\n\n // Setup the mutationobserver so we can remove the line if it's start or end is removed.\n this.mutationObserver = new MutationObserver(function(mutations_list) {\n mutations_list.forEach(function(mutation) {\n mutation.removedNodes.forEach(function(removed_node) {\n if(removed_node == this.start || removed_node == this.end) {\n console.warning(\"Element removed\",removed_node);\n this.remove();\n }\n });\n });\n });\n \n this.mutationObserver.observe(this.start.parentElement, { subtree: false, childList: true });\n this.mutationObserver.observe(this.end.parentElement, { subtree: false, childList: true });\n \n\n // Setup the position checker\n this.positionCheck(); // Initialize refresh\n if(this.specs.autorefresh > 0){\n this.refreshTimer = setInterval(()=>{this.positionCheck();},this.specs.autorefresh);\n }\n this.active = true;\n this.update(); // fist draw\n }\n\n /**\n * Change the simpleline config\n * @param {object} config The object containing the specs \n */\n setConfig(config){\n // setup defaults\n if(!(this.specs)){\n this.specs = {\n autorefresh: 10,\n class: \"\",\n color: \"\", // invalid propery makes it inherit from parent containers\n anchors: {\n // top, middle, bottom\n // left, center, right\n start: [\"middle\",\"right\"],\n end: [\"middle\", \"left\"],\n },\n gravity: {\n start: 1,\n end: 1,\n },\n stroke: \"4px\",\n };\n }\n\n if(config && typeof config == \"object\"){\n specsCopy(this.specs,config);\n }\n if(this.svg){\n // Re-initialize the refresh timer\n clearInterval(this.refreshTimer);\n if(this.specs.autorefresh > 0){\n this.refreshTimer = setInterval(()=>{this.positionCheck();},this.specs.autorefresh);\n }\n // Update the svg image\n this.update();\n }\n }\n\n /**\n * Get the css class of the line\n */\n get cssClass(){\n return this.specs.class;\n }\n\n /**\n * Set the css class of the line\n */\n set cssClass(cssClass)\n {\n this.specs.class = cssClass;\n this.update();\n }\n\n /**\n * Check for an element positino change and update accordingly\n */\n positionCheck(){\n const startPos = {x: this.start.offsetLeft, y: this.start.offsetTop};\n const endPos = {x: this.end.offsetLeft, y: this.end.offsetTop};\n\n let needUpdate = false;\n if(this.startPos){\n needUpdate = needUpdate || (this.startPos.x != startPos.x || this.startPos.y != startPos.y);\n //console.info(\"Offset position changed for\",this.start);\n }\n this.startPos = startPos;\n\n if(this.endPos){\n needUpdate = needUpdate || (this.endPos.x != endPos.x || this.endPos.y != endPos.y);\n //console.info(\"Offset position changed for\",this.end);\n }\n this.endPos = endPos;\n\n if(needUpdate){\n this.update();\n }\n\n }\n\n getContainer(){\n // Validate or determine container\n let container = this.start.offsetParent;\n if(!container) {\n if(getComputedStyle(this.start).position == \"fixed\"){\n container = document.querySelector(\"body\");\n } else {\n console.error(\"Start element has no offsetParent. likely \");\n }\n }\n return container;\n }\n\n getAnchorPoint(anchor){\n\n let el = this.start;\n if(anchor != \"start\"){\n anchor = \"end\";\n el = this.end;\n }\n\n let x, dirX;\n let y, dirY;\n // determine start coordinates\n if(this.specs.anchors[anchor].includes(\"left\")){\n x = 0;\n dirX = -1;\n } else if (this.specs.anchors[anchor].includes(\"right\")) {\n x = el.offsetWidth -1;\n dirX = 1;\n } else { // center\n x = el.offsetWidth / 2;\n dirX = 0;\n }\n if(this.specs.anchors[anchor].includes(\"top\")){\n y = 0;\n dirY = -1;\n } else if (this.specs.anchors[anchor].includes(\"bottom\")) {\n y = el.offsetHeight -1;\n dirY = 1;\n } else { // middle\n y = el.offsetHeight / 2;\n dirY = 0;\n }\n\n return { x: x, y: y, dir: {x: dirX, y: dirY}};\n }\n\n /**\n * Generates the svg defs parts including the marker\n * @returns {Object}\n */\n svgDefs(){\n const defs = document.createElementNS(\"http://www.w3.org/2000/svg\", \"defs\");\n const marker = document.createElementNS(\"http://www.w3.org/2000/svg\", \"marker\");\n marker.setAttribute(\"id\",`simpleline-${this.id}-arrow`);\n marker.setAttribute(\"markerUnits\",`strokeWidth`);\n marker.setAttribute(\"viewBox\",`-8 -8 16 16`);\n marker.setAttribute(\"orient\",`auto`);\n marker.setAttribute(\"markerWidth\",`4`);\n marker.setAttribute(\"markerHeight\",`4`);\n defs.appendChild(marker);\n const polygon = document.createElementNS(\"http://www.w3.org/2000/svg\", \"polygon\");\n polygon.setAttribute(\"fill\",`currentColor`);\n polygon.setAttribute(\"points\",`-8,-8 8,0 -8,8 -5,0`);\n marker.append(polygon);\n return defs;\n }\n\n /**\n * (Re)Paint the arrow\n * \n */\n update(){\n if(!this.active){ return;} // don't do this if we are no longer active\n\n const container = this.getContainer();\n if (!container) { return; } // Do not create any svg if container is empty\n\n if(this.svg && (this.svg instanceof SVGElement)){\n if(container !== this.svg.offsetParent){\n // update the svg's parent if the container was changed\n container.appendChild(this.svg);\n }\n } else {\n this.svg = document.createElementNS('http://www.w3.org/2000/svg','svg');\n this.svg.setAttribute(\"id\",`simpleline-${this.id}`);\n this.svg.setAttribute(\"class\",`simpleline ${this.specs.class}`);\n this.svg.style.position = \"absolute\";\n this.svg.style.pointerEvents = 'none';\n\n container.appendChild(this.svg);\n this.svg.appendChild(this.svgDefs()); // create a new defs element and add it to the svg\n // Add the marker definitions\n\n }\n\n // determine proper x, y ,h and w\n const startAnchor = this.getAnchorPoint(\"start\");\n const endAnchor = this.getAnchorPoint(\"end\");\n\n // make it a little shorter at the end to compensate for the size of the arrow\n const strokeWpx = calc(this.specs.stroke);\n endAnchor.x += endAnchor.dir.x * strokeWpx *1.5;\n endAnchor.y += endAnchor.dir.y * strokeWpx *1.5;\n\n const elStartPos = getElementPosition(this.start,container);\n const elEndPos = getElementPosition(this.end,container);\n\n //console.info(\"startAnchor\",startAnchor);\n //console.info(\"endAnchor\",endAnchor);\n //console.info(\"elStartPos\",elStartPos);\n //console.info(\"elEndPos\",elEndPos);\n\n // Determine basic h/w between start and end anchor to help determine desired control point length\n const w = Math.max(elStartPos.x + startAnchor.x,elEndPos.x + endAnchor.x)\n - Math.min(elStartPos.x + startAnchor.x,elEndPos.x + endAnchor.x);\n const h = Math.max(elStartPos.y + startAnchor.y,elEndPos.y + endAnchor.y)\n - Math.min(elStartPos.y + startAnchor.y,elEndPos.y + endAnchor.y);\n const weight = Math.sqrt(h*h+w*w)/2;\n // Determine start positions and end positions relative to container\n const cStartPos = {\n x: elStartPos.x + startAnchor.x,\n y: elStartPos.y + startAnchor.y,\n dirx: elStartPos.x + startAnchor.x + startAnchor.dir.x * this.specs.gravity.start * weight,\n diry: elStartPos.y + startAnchor.y + startAnchor.dir.y * this.specs.gravity.start * weight,\n };\n\n const cEndPos = {\n x: elEndPos.x + endAnchor.x,\n y: elEndPos.y + endAnchor.y,\n dirx: elEndPos.x + endAnchor.x + endAnchor.dir.x * this.specs.gravity.end * weight,\n diry: elEndPos.y + endAnchor.y + endAnchor.dir.y * this.specs.gravity.end * weight,\n };\n\n // determine the bounding rectangle of the\n //console.info(\"cStartPos\",cStartPos);\n //console.info(\"cEndPos\",cEndPos);\n\n const margin = (!isNaN(this.specs.stroke)?5*this.specs.stroke:25);\n const bounds = {\n x: Math.min(cStartPos.x,cEndPos.x,cStartPos.dirx,cEndPos.dirx) - margin,\n y: Math.min(cStartPos.y,cEndPos.y,cStartPos.diry,cEndPos.diry) - margin,\n w: Math.max(cStartPos.x,cEndPos.x,cStartPos.dirx,cEndPos.dirx)\n - Math.min(cStartPos.x,cEndPos.x,cStartPos.dirx,cEndPos.dirx) + 2*margin,\n h: Math.max(cStartPos.y,cEndPos.y,cStartPos.diry,cEndPos.diry)\n - Math.min(cStartPos.y,cEndPos.y,cStartPos.diry,cEndPos.diry) + 2*margin,\n };\n\n // Now convert the coordinates to the svg space\n const startPos = {\n x: cStartPos.x - bounds.x,\n y: cStartPos.y - bounds.y,\n dirx: cStartPos.dirx - bounds.x,\n diry: cStartPos.diry - bounds.y,\n };\n const endPos = {\n x: cEndPos.x - bounds.x,\n y: cEndPos.y - bounds.y,\n dirx: cEndPos.dirx - bounds.x,\n diry: cEndPos.diry - bounds.y,\n };\n\n //console.info(\"Bounds\",bounds);\n //console.info(\"startPos\",startPos);\n //console.info(\"endPos\",endPos);\n // Update the svg attributes\n this.svg.setAttribute(\"viewBox\",`0 0 ${bounds.w}, ${bounds.h}`);\n this.svg.setAttribute(\"width\",`${bounds.w}px`);\n this.svg.setAttribute(\"height\",`${bounds.h}px`);\n this.svg.style.color = this.specs.color;\n\n // Reposition the SVG relative to the container\n this.svg.style.left = `${bounds.x}px`;\n this.svg.style.top = `${bounds.y}px`;\n this.svg.style.width = `${bounds.w}px`;\n this.svg.style.height = `${bounds.h}px`;\n\n\n // Draw the line\n if(!this.line){\n this.line = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n this.line.setAttribute(\"marker-end\",`url(#simpleline-${this.id}-arrow)`);\n this.svg.appendChild(this.line);\n }\n let strokeWidth = this.specs.stroke;\n if(!isNaN(strokeWidth) && strokeWidth != 0){\n strokeWidth = `${strokeWidth}px`;\n }\n this.line.style.stroke = \"currentColor\";\n this.line.style.fill = \"none\";\n this.line.style.strokeWidth= strokeWidth;\n this.line.setAttribute('d',\n `M ${startPos.x} ${startPos.y}\n C ${startPos.dirx} ${startPos.diry}, ${endPos.dirx} ${endPos.diry}, ${endPos.x} ${endPos.y}`);\n }\n\n /**\n * Remove the line element from the dom and invalidate it.\n */\n remove(){\n // remove the line\n this.svg.remove();\n this.svg = null;\n this.line = null;\n\n // clear the refresh timer\n clearInterval(this.refreshTimer);\n // stop the observers\n this.resizeObserver.disconnect();\n this.mutationObserver.disconnect();\n this.active = false;\n }\n}\n"],"names":["specsCopy","to","from","ix","hasOwnProperty","_typeof","Array","isArray","getElementPosition","el","reference","HTMLElement","x","y","document","querySelector","offsetParent","offsetLeft","offsetTop","elR","getBoundingClientRect","refR","left","top","SimpleLine","start","end","config","func","delay","timer","svg","id","idCounter","setConfig","this","String","console","error","startSelector","endSelector","resizeObserver","ResizeObserver","_this","update","args","context","clearTimeout","setTimeout","apply","observe","mutationObserver","MutationObserver","mutations_list","forEach","mutation","removedNodes","removed_node","warning","remove","parentElement","subtree","childList","positionCheck","specs","autorefresh","refreshTimer","setInterval","active","class","color","anchors","gravity","stroke","clearInterval","_this2","cssClass","startPos","endPos","needUpdate","container","getComputedStyle","position","anchor","dirX","dirY","includes","offsetWidth","offsetHeight","dir","defs","createElementNS","marker","setAttribute","appendChild","polygon","append","getContainer","SVGElement","style","pointerEvents","svgDefs","startAnchor","getAnchorPoint","endAnchor","strokeWpx","elStartPos","elEndPos","w","Math","max","min","h","weight","sqrt","cStartPos","dirx","diry","cEndPos","margin","isNaN","bounds","width","height","line","strokeWidth","fill","disconnect"],"mappings":"iuBAYMA,UAAY,SAAZA,UAAaC,GAAIC,UACf,IAAMC,MAAMF,GACTC,KAAKE,eAAeD,MACE,UAAjBE,QAAOJ,GAAGE,MACY,UAAnBE,QAAOH,KAAKC,KAEZG,MAAMC,QAAQN,GAAGE,KACbG,MAAMC,QAAQL,KAAKC,OAClBF,GAAGE,IAAMG,MAAMJ,KAAKA,KAAKC,MAG7BH,UAAUC,GAAGE,IAAKD,KAAKC,KAI3BF,GAAGE,IAAMD,KAAKC,MAuBxBK,mBAAqB,SAACC,GAAIC,gBACxBD,IAAQA,cAAcE,mBAEf,CAACC,EAAG,EAAGC,EAAG,MAGhBH,WAAeA,qBAAqBC,cAErCD,UAAYI,SAASC,cAAc,SAGnCN,GAAG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