Mercurial > repos > fubar > jbrowse2
view x/static/js/8526.5dd9c712.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 |
line wrap: on
line source
{"version":3,"file":"static/js/8526.5dd9c712.chunk.js","mappings":"qMAQA,MAaA,GAb0CA,EAAAA,EAAAA,WAAS,SAAUC,GAG3D,MAAM,MAAEC,GAAUD,EAElB,OACEE,EAAAA,cAAA,WACEA,EAAAA,cAACC,EAAAA,GAA+BH,GAChCE,EAAAA,cAACE,EAAAA,EAAU,CAACH,MAAOA,IAGzB,G,0SChBA,MAWA,EAXgBD,IAOd,MAAM,MAAEK,EAAQ,wBAA2BL,EAC3C,OAAOE,EAAAA,cAAA,OAAAI,EAAA,GAAUN,GAAWO,EAAAA,EAAAA,cAAaF,IAAU,ECyErD,GA7EoBN,EAAAA,EAAAA,WAAS,UAAU,MACrCE,EAAK,UACLO,EAAS,WACTC,EAAU,UACVC,IAOA,MAAM,kBACJC,EAAiB,cACjBC,EAAa,wBACbC,EAAuB,6BACvBC,EAA4B,iBAC5BC,EAAgB,QAChBC,GACEf,EACEgB,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,EACLd,EAAAA,cAAAA,EAAAA,SAAA,KAGIW,EACEX,EAAAA,cAACsB,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,OACEN,EAAAA,cAACA,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A,QAQtD,G,gFCzGO,SAASa,EAAOC,EAAyBC,EAAeC,EAAK,GAClE,MAAMC,EAAOF,EACVrC,KAAIwC,GAAKJ,EAAIK,WAAUC,GAAKA,EAAErC,OAASmC,MACvCG,MAAK,CAACC,EAAGC,IAAMD,EAAIC,IACtB,IAAIC,EAAU,EACd,IAAK,MAAMC,KAAOR,EAAM,CACtB,MAAMrC,EAAMd,KAAKqC,IAAIqB,EAASC,EAAMT,GAChCpC,GAAO4C,GACTV,EAAIY,OAAO9C,EAAK,EAAGkC,EAAIY,OAAOD,EAAK,GAAG,IAExCD,GAAoB,CACtB,CAEA,OAAOV,CACT,CAEO,SAASa,EAASb,EAAyBC,EAAeC,EAAK,GACpE,MAAMC,EAAOF,EACVrC,KAAIwC,GAAKJ,EAAIK,WAAUC,GAAKA,EAAErC,OAASmC,MACvCG,MAAK,CAACC,EAAGC,IAAMA,EAAID,IACtB,IAAIE,EAAUV,EAAIrC,OAAS,EAC3B,IAAK,MAAMgD,KAAOR,EAAM,CACtB,MAAMrC,EAAMd,KAAKC,IAAIyD,EAASC,EAAMT,GAChCpC,GAAO4C,GACTV,EAAIY,OAAO9C,EAAK,EAAGkC,EAAIY,OAAOD,EAAK,GAAG,IAExCD,GAAoB,CACtB,CAEA,OAAOV,CACT,CAEA,MAAMc,EAAqB,KAEpB,SAAStB,EAAUzD,GACxB,MAAM,cAAEgF,GAAkBhF,GACpB,YAAEiF,IAAgB3C,EAAAA,EAAAA,mBAAkBtC,GACpCkF,GAAQC,EAAAA,EAAAA,oBAAmBnF,GAC3BoF,GAAYC,EAAAA,EAAAA,SAAQH,EAAO,QACjC,MAAuB,gBAAhBD,GAAkCD,EAErC,IADAtC,EAAAA,EAAAA,aAAY0C,EAAWL,GAAsB,GAEnD,C","sources":["../../../plugins/wiggle/src/MultiLinearWiggleDisplay/components/WiggleDisplayComponent.tsx","../../../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"],"sourcesContent":["import React from 'react'\nimport { BaseLinearDisplayComponent } from '@jbrowse/plugin-linear-genome-view'\nimport { observer } from 'mobx-react'\n\n// locals\nimport { WiggleDisplayModel } from '../models/model'\nimport YScaleBars from './YScaleBars'\n\nconst MultiLinearWiggleDisplayComponent = observer(function (props: {\n model: WiggleDisplayModel\n}) {\n const { model } = props\n\n return (\n <div>\n <BaseLinearDisplayComponent {...props} />\n <YScaleBars model={model} />\n </div>\n )\n})\n\nexport default MultiLinearWiggleDisplayComponent\n","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"],"names":["observer","props","model","React","BaseLinearDisplayComponent","YScaleBars","color","_extends","getFillProps","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"],"sourceRoot":""}