Mercurial > repos > fubar > jbrowse2
annotate x/static/js/8880.6ae9d985.chunk.js.map @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
rev | line source |
---|---|
125
49f3d3878413
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff
changeset
|
1 {"version":3,"file":"static/js/8880.6ae9d985.chunk.js","mappings":"iZAGA,MAWA,EAXgBA,IAOd,MAAM,MAAEC,EAAQ,wBAA2BD,EAC3C,OAAOE,EAAAA,cAAA,OAAAC,EAAA,GAAUH,GAAWI,EAAAA,EAAAA,cAAaH,IAAU,ECyErD,GA7EoBI,EAAAA,EAAAA,WAAS,UAAU,MACrCC,EAAK,UACLC,EAAS,WACTC,EAAU,UACVC,IAOA,MAAM,kBACJC,EAAiB,cACjBC,EAAa,wBACbC,EAAuB,6BACvBC,EAA4B,iBAC5BC,EAAgB,QAChBC,GACET,EACEU,EAAcC,KAAKC,IAAIX,EAAW,IAClCY,EAAkBZ,EAAY,GAC9Ba,EAAgBN,EAAmB,GAAK,EACxCO,EAAcb,EAAaY,EAAgB,EAE3CE,GADYb,EAAY,GAAK,KAEnBE,IAAkBE,EAA+B,GAAK,GAEtE,OAAOE,EACLb,EAAAA,cAAAA,EAAAA,SAAA,KAGIU,EACEV,EAAAA,cAACqB,EAAM,CACLC,EAAG,EACHC,EAAGH,EACHI,MAAOL,EACPM,QAASZ,EAAQa,OAAS,KAAQrB,IAElC,KAELQ,EAAQc,KAAI,CAACC,EAAQC,KACpB,MAAMC,EAAYf,KAAKC,IAAI,GAAIX,GAC/B,OACEL,EAAAA,cAACA,EAAAA,SAAc,CAAC+B,IAAK,GAAGH,EAAOI,QAAQH,KACpCnB,EAA0B,K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AA,KAAG4F,GAAG,gBAAgBJ,EAAeD,IACrCvF,EAAAA,cAAA,KAAGsD,UAAW,aAAavC,KAAKqC,KAAKuC,EAAU,OAC7C3F,EAAAA,cAAC6F,EAAAA,EAAU,CAACzF,MAAOkF,EAAMrC,YAAY,OAAO1C,WAAS,KAI7D,C","sources":["../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/RectBg.tsx","../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/ColorLegend.tsx","../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/ScoreLegend.tsx","../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/YScaleBars.tsx","../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/util.ts","../../../plugins/wiggle/src/MultiLinearWiggleDisplay/models/renderSvg.tsx"],"sourcesContent":["import { getFillProps } from '@jbrowse/core/util'\nimport React from 'react'\n\nconst RectBg = (props: {\n x: number\n y: number\n width: number\n height: number\n color?: string\n}) => {\n const { color = 'rgb(255,255,255,0.8)' } = props\n return <rect {...props} {...getFillProps(color)} />\n}\n\nexport default RectBg\n","import React from 'react'\nimport { observer } from 'mobx-react'\n\n// locals\nimport { WiggleDisplayModel } from '../models/model'\nimport RectBg from './RectBg'\n\nconst ColorLegend = observer(function ({\n model,\n rowHeight,\n labelWidth,\n exportSVG,\n}: {\n model: WiggleDisplayModel\n rowHeight: number\n labelWidth: number\n exportSVG?: boolean\n}) {\n const {\n needsCustomLegend,\n needsScalebar,\n needsFullHeightScalebar,\n rowHeightTooSmallForScalebar,\n renderColorBoxes,\n sources,\n } = model\n const svgFontSize = Math.min(rowHeight, 12)\n const canDisplayLabel = rowHeight > 11\n const colorBoxWidth = renderColorBoxes ? 15 : 0\n const legendWidth = labelWidth + colorBoxWidth + 5\n const svgOffset = exportSVG ? 10 : 0\n const extraOffset =\n svgOffset || (needsScalebar && !rowHeightTooSmallForScalebar ? 50 : 0)\n\n return sources ? (\n <>\n {\n /* 0.25 for hanging letters like g */\n needsFullHeightScalebar ? (\n <RectBg\n y={0}\n x={extraOffset}\n width={legendWidth}\n height={(sources.length + 0.25) * rowHeight}\n />\n ) : null\n }\n {sources.map((source, idx) => {\n const boxHeight = Math.min(20, rowHeight)\n return (\n <React.Fragment key={`${source.name}-${idx}`}>\n {needsFullHeightScalebar ? null : (\n <RectBg\n y={idx * rowHeight + 1}\n x={extraOffset}\n width={legendWidth}\n height={boxHeight}\n />\n )}\n {source.color ? (\n <RectBg\n y={idx * rowHeight + 1}\n x={extraOffset}\n width={colorBoxWidth}\n height={needsCustomLegend ? rowHeight : boxHeight}\n color={source.color}\n />\n ) : null}\n {canDisplayLabel ? (\n <text\n y={idx * rowHeight + 13}\n x={extraOffset + colorBoxWidth + 2}\n fontSize={svgFontSize}\n >\n {source.name}\n </text>\n ) : null}\n </React.Fragment>\n )\n })}\n </>\n ) : null\n})\n\nexport default ColorLegend\n","import React from 'react'\nimport { measureText, getContainingView } from '@jbrowse/core/util'\nimport { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\nimport { observer } from 'mobx-react'\n\n// locals\nimport { WiggleDisplayModel } from '../models/model'\nimport RectBg from './RectBg'\n\ntype LGV = LinearGenomeViewModel\n\nconst ScoreLegend = observer(({ model }: { model: WiggleDisplayModel }) => {\n const { ticks, scaleType } = model\n const { width } = getContainingView(model) as LGV\n const legend = `[${ticks?.values[0]}-${ticks?.values[1]}]${scaleType === 'log' ? ' (log scale)' : ''}`\n const len = measureText(legend, 14)\n const padding = 25\n const xpos = width - len - padding\n return (\n <>\n <RectBg y={0} x={xpos} width={len + 6} height={16} />\n <text y={13} x={xpos}>\n {legend}\n </text>\n </>\n )\n})\n\nexport default ScoreLegend\n","import React from 'react'\nimport { measureText, getContainingView } from '@jbrowse/core/util'\nimport { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\nimport { observer } from 'mobx-react'\n\n// locals\nimport { WiggleDisplayModel } from '../models/model'\nimport YScaleBar from '../../shared/YScaleBar'\nimport ColorLegend from './ColorLegend'\nimport ScoreLegend from './ScoreLegend'\nimport { getOffset } from './util'\n\ntype LGV = LinearGenomeViewModel\n\nconst Wrapper = observer(function ({\n children,\n model,\n exportSVG,\n}: {\n model: WiggleDisplayModel\n children: React.ReactNode\n exportSVG?: boolean\n}) {\n const { height } = model\n return exportSVG ? (\n children\n ) : (\n <svg\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none',\n height,\n width: getContainingView(model).width,\n }}\n >\n {children}\n </svg>\n )\n})\n\nexport const YScaleBars = observer(function (props: {\n model: WiggleDisplayModel\n orientation?: string\n exportSVG?: boolean\n}) {\n const { model, orientation, exportSVG } = props\n const {\n stats,\n needsCustomLegend,\n needsFullHeightScalebar,\n rowHeightTooSmallForScalebar,\n rowHeight,\n sources,\n ticks,\n } = model\n const svgFontSize = Math.min(rowHeight, 12)\n const canDisplayLabel = rowHeight > 11\n const { width: viewWidth } = getContainingView(model) as LGV\n const minWidth = 20\n\n const ready = stats && sources\n if (!ready) {\n return null\n }\n\n const labelWidth = Math.max(\n ...sources\n .map(s => measureText(s.name, svgFontSize))\n .map(width => (canDisplayLabel ? width : minWidth)),\n )\n\n return (\n <Wrapper {...props}>\n {needsFullHeightScalebar ? (\n <>\n <g transform={`translate(${!exportSVG ? getOffset(model) : 0},0)`}>\n <YScaleBar model={model} orientation={orientation} />\n </g>\n <g transform={`translate(${viewWidth - labelWidth - 100},0)`}>\n <ColorLegend\n exportSVG={exportSVG}\n model={model}\n rowHeight={12}\n labelWidth={labelWidth}\n />\n </g>\n </>\n ) : (\n <>\n <ColorLegend\n exportSVG={exportSVG}\n model={model}\n rowHeight={model.rowHeight}\n labelWidth={labelWidth}\n />\n\n {rowHeightTooSmallForScalebar || needsCustomLegend ? (\n <ScoreLegend {...props} />\n ) : (\n sources.map((_source, idx) => (\n <g\n transform={`translate(0 ${rowHeight * idx})`}\n key={`${JSON.stringify(ticks)}-${idx}`}\n >\n <YScaleBar model={model} orientation={orientation} />\n </g>\n ))\n )}\n </>\n )}\n </Wrapper>\n )\n})\n\nexport default YScaleBars\n","import {\n getContainingTrack,\n getContainingView,\n measureText,\n} from '@jbrowse/core/util'\nimport { WiggleDisplayModel } from '../models/model'\nimport { getConf } from '@jbrowse/core/configuration'\nimport { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\n\nexport function moveUp(arr: { name: string }[], sel: string[], by = 1) {\n const idxs = sel\n .map(l => arr.findIndex(v => v.name === l))\n .sort((a, b) => a - b)\n let lastIdx = 0\n for (const old of idxs) {\n const idx = Math.max(lastIdx, old - by)\n if (idx >= lastIdx) {\n arr.splice(idx, 0, arr.splice(old, 1)[0]!)\n }\n lastIdx = lastIdx + 1\n }\n\n return arr\n}\n\nexport function moveDown(arr: { name: string }[], sel: string[], by = 1) {\n const idxs = sel\n .map(l => arr.findIndex(v => v.name === l))\n .sort((a, b) => b - a)\n let lastIdx = arr.length - 1\n for (const old of idxs) {\n const idx = Math.min(lastIdx, old + by)\n if (idx <= lastIdx) {\n arr.splice(idx, 0, arr.splice(old, 1)[0]!)\n }\n lastIdx = lastIdx - 1\n }\n\n return arr\n}\n\nconst trackLabelFontSize = 12.8\n\nexport function getOffset(model: WiggleDisplayModel) {\n const { prefersOffset } = model\n const { trackLabels } = getContainingView(model) as LinearGenomeViewModel\n const track = getContainingTrack(model)\n const trackName = getConf(track, 'name')\n return trackLabels === 'overlapping' && !prefersOffset\n ? measureText(trackName, trackLabelFontSize) + 100\n : 10\n}\n","import React from 'react'\nimport { getContainingView } from '@jbrowse/core/util'\nimport { when } from 'mobx'\nimport {\n ExportSvgDisplayOptions,\n LinearGenomeViewModel,\n} from '@jbrowse/plugin-linear-genome-view'\n\n// locals\nimport { WiggleDisplayModel } from './model'\nimport YScaleBars from '../components/YScaleBars'\n\nexport async function renderSvg(\n self: WiggleDisplayModel,\n opts: ExportSvgDisplayOptions,\n superRenderSvg: (opts: ExportSvgDisplayOptions) => Promise<React.ReactNode>,\n) {\n await when(() => !!self.stats && !!self.regionCannotBeRenderedText)\n const { offsetPx } = getContainingView(self) as LinearGenomeViewModel\n return (\n <>\n <g id=\"snpcov\">{await superRenderSvg(opts)}</g>\n <g transform={`translate(${Math.max(-offsetPx, 0)})`}>\n <YScaleBars model={self} orientation=\"left\" exportSVG />\n </g>\n </>\n )\n}\n"],"names":["props","color","React","_extends","getFillProps","observer","model","rowHeight","labelWidth","exportSVG","needsCustomLegend","needsScalebar","needsFullHeightScalebar","rowHeightTooSmallForScalebar","renderColorBoxes","sources","svgFontSize","Math","min","canDisplayLabel","colorBoxWidth","legendWidth","extraOffset","RectBg","y","x","width","height","length","map","source","idx","boxHeight","key","name","fontSize","ticks","scaleType","getContainingView","legend","values","len","measureText","xpos","Wrapper","children","style","position","top","left","pointerEvents","orientation","stats","viewWidth","max","s","transform","getOffset","YScaleBar","ColorLegend","ScoreLegend","_source","JSON","stringify","moveUp","arr","sel","by","idxs","l","findIndex","v","sort","a","b","lastIdx","old","splice","moveDown","trackLabelFontSize","prefersOffset","trackLabels","track","getContainingTrack","trackName","getConf","async","renderSvg","self","opts","superRenderSvg","when","regionCannotBeRenderedText","offsetPx","id","YScaleBars"],"sourceRoot":""} |