@genome-spy/core 0.37.4 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/__vite-browser-external-ENoMJThg.js +8 -0
- package/dist/bundle/_commonjsHelpers-QtkX90xp.js +30 -0
- package/dist/bundle/index-1QVesMzU.js +1074 -0
- package/dist/bundle/index-Cbz74kpR.js +638 -0
- package/dist/bundle/index-LD6yPc3X.js +515 -0
- package/dist/bundle/index-Pv3tKJ1W.js +2190 -0
- package/dist/bundle/index-UyrC0vvF.js +72 -0
- package/dist/bundle/index-Y-LdHNIz.js +501 -0
- package/dist/bundle/index-gn8bhQ8w.js +4050 -0
- package/dist/bundle/index-lmJu1tfP.js +1372 -0
- package/dist/bundle/index-z4Cs62EO.js +279 -0
- package/dist/bundle/index.es.js +6467 -20590
- package/dist/bundle/index.js +92 -123
- package/dist/bundle/long-Veu0zKh9.js +2382 -0
- package/dist/bundle/remoteFile-Ur-gRKsH.js +96 -0
- package/dist/schema.json +524 -122
- package/dist/src/data/collector.d.ts +11 -11
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +8 -8
- package/dist/src/data/dataFlow.d.ts +18 -18
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +7 -7
- package/dist/src/data/flowNode.d.ts +9 -9
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +5 -5
- package/dist/src/data/flowOptimizer.d.ts +11 -11
- package/dist/src/data/flowOptimizer.d.ts.map +1 -1
- package/dist/src/data/flowOptimizer.js +7 -7
- package/dist/src/data/flowTestUtils.d.ts +2 -2
- package/dist/src/data/flowTestUtils.d.ts.map +1 -1
- package/dist/src/data/flowTestUtils.js +1 -1
- package/dist/src/data/sources/dataSource.js +1 -1
- package/dist/src/data/sources/dataSourceFactory.d.ts +3 -3
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +20 -20
- package/dist/src/data/sources/dataUtils.d.ts +20 -20
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +11 -11
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts +3 -3
- package/dist/src/data/sources/dynamic/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisGenomeSource.js +2 -2
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts +6 -6
- package/dist/src/data/sources/dynamic/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/axisTickSource.js +4 -4
- package/dist/src/data/sources/dynamic/bamSource.d.ts +7 -13
- package/dist/src/data/sources/dynamic/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bamSource.js +35 -27
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts +9 -9
- package/dist/src/data/sources/dynamic/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigBedSource.js +31 -18
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts +7 -7
- package/dist/src/data/sources/dynamic/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/bigWigSource.js +33 -26
- package/dist/src/data/sources/dynamic/gff3Source.d.ts +9 -0
- package/dist/src/data/sources/dynamic/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/gff3Source.js +17 -2
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts +6 -9
- package/dist/src/data/sources/dynamic/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/indexedFastaSource.js +28 -18
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts +10 -10
- package/dist/src/data/sources/dynamic/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/singleAxisLazySource.js +6 -6
- package/dist/src/data/sources/dynamic/tabixSource.d.ts +11 -8
- package/dist/src/data/sources/dynamic/tabixSource.d.ts.map +1 -1
- package/dist/src/data/sources/dynamic/tabixSource.js +31 -17
- package/dist/src/data/sources/inlineSource.d.ts +7 -7
- package/dist/src/data/sources/inlineSource.d.ts.map +1 -1
- package/dist/src/data/sources/inlineSource.js +5 -5
- package/dist/src/data/sources/namedSource.d.ts +9 -9
- package/dist/src/data/sources/namedSource.d.ts.map +1 -1
- package/dist/src/data/sources/namedSource.js +6 -6
- package/dist/src/data/sources/sequenceSource.d.ts +7 -7
- package/dist/src/data/sources/sequenceSource.d.ts.map +1 -1
- package/dist/src/data/sources/sequenceSource.js +4 -4
- package/dist/src/data/sources/urlSource.d.ts +7 -7
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +4 -4
- package/dist/src/data/transforms/aggregate.d.ts +3 -3
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +2 -2
- package/dist/src/data/transforms/clone.d.ts +2 -2
- package/dist/src/data/transforms/clone.d.ts.map +1 -1
- package/dist/src/data/transforms/clone.js +1 -1
- package/dist/src/data/transforms/coverage.d.ts +3 -3
- package/dist/src/data/transforms/coverage.d.ts.map +1 -1
- package/dist/src/data/transforms/coverage.js +1 -1
- package/dist/src/data/transforms/coverage.test.js +1 -1
- package/dist/src/data/transforms/filter.d.ts +3 -3
- package/dist/src/data/transforms/filter.d.ts.map +1 -1
- package/dist/src/data/transforms/filter.js +2 -2
- package/dist/src/data/transforms/filter.test.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +4 -4
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +3 -3
- package/dist/src/data/transforms/flatten.d.ts +2 -2
- package/dist/src/data/transforms/flatten.d.ts.map +1 -1
- package/dist/src/data/transforms/flatten.js +3 -3
- package/dist/src/data/transforms/flatten.test.js +6 -6
- package/dist/src/data/transforms/flattenCompressedExons.d.ts +2 -2
- package/dist/src/data/transforms/flattenCompressedExons.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenCompressedExons.js +1 -1
- package/dist/src/data/transforms/flattenDelimited.d.ts +2 -2
- package/dist/src/data/transforms/flattenDelimited.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenDelimited.js +2 -2
- package/dist/src/data/transforms/flattenDelimited.test.js +5 -5
- package/dist/src/data/transforms/flattenSequence.d.ts +2 -2
- package/dist/src/data/transforms/flattenSequence.d.ts.map +1 -1
- package/dist/src/data/transforms/flattenSequence.js +1 -1
- package/dist/src/data/transforms/flattenSequence.test.js +1 -1
- package/dist/src/data/transforms/formula.d.ts +3 -3
- package/dist/src/data/transforms/formula.d.ts.map +1 -1
- package/dist/src/data/transforms/formula.js +2 -2
- package/dist/src/data/transforms/identifier.d.ts +3 -3
- package/dist/src/data/transforms/identifier.d.ts.map +1 -1
- package/dist/src/data/transforms/identifier.js +2 -2
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts +3 -3
- package/dist/src/data/transforms/linearizeGenomicCoordinate.d.ts.map +1 -1
- package/dist/src/data/transforms/linearizeGenomicCoordinate.js +2 -2
- package/dist/src/data/transforms/measureText.d.ts +2 -2
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +1 -1
- package/dist/src/data/transforms/pileup.d.ts +3 -3
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -1
- package/dist/src/data/transforms/pileup.test.js +1 -1
- package/dist/src/data/transforms/project.d.ts +2 -2
- package/dist/src/data/transforms/project.d.ts.map +1 -1
- package/dist/src/data/transforms/project.js +1 -1
- package/dist/src/data/transforms/project.test.js +1 -1
- package/dist/src/data/transforms/regexExtract.d.ts +2 -2
- package/dist/src/data/transforms/regexExtract.d.ts.map +1 -1
- package/dist/src/data/transforms/regexExtract.js +1 -1
- package/dist/src/data/transforms/regexExtract.test.js +3 -3
- package/dist/src/data/transforms/regexFold.d.ts +2 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +2 -2
- package/dist/src/data/transforms/regexFold.test.js +3 -3
- package/dist/src/data/transforms/sample.d.ts +2 -2
- package/dist/src/data/transforms/sample.d.ts.map +1 -1
- package/dist/src/data/transforms/sample.js +2 -2
- package/dist/src/data/transforms/stack.d.ts +3 -3
- package/dist/src/data/transforms/stack.d.ts.map +1 -1
- package/dist/src/data/transforms/stack.js +2 -2
- package/dist/src/data/transforms/stack.test.js +2 -2
- package/dist/src/data/transforms/transformFactory.d.ts +5 -5
- package/dist/src/data/transforms/transformFactory.d.ts.map +1 -1
- package/dist/src/data/transforms/transformFactory.js +3 -3
- package/dist/src/encoder/accessor.d.ts +6 -6
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +4 -4
- package/dist/src/encoder/encoder.d.ts +59 -59
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +47 -42
- package/dist/src/encoder/encoder.test.js +4 -4
- package/dist/src/fonts/bmFontManager.d.ts +7 -7
- package/dist/src/fonts/bmFontManager.d.ts.map +1 -1
- package/dist/src/fonts/bmFontManager.js +3 -3
- package/dist/src/fonts/bmFontMetrics.d.ts +6 -6
- package/dist/src/fonts/bmFontMetrics.d.ts.map +1 -1
- package/dist/src/fonts/bmFontMetrics.js +4 -4
- package/dist/src/genome/genome.d.ts +7 -7
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +2 -2
- package/dist/src/genome/genomeStore.d.ts +2 -2
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/locusFormat.d.ts +7 -7
- package/dist/src/genome/locusFormat.d.ts.map +1 -1
- package/dist/src/genome/locusFormat.js +4 -4
- package/dist/src/genome/scaleIndex.d.ts +1 -1
- package/dist/src/genome/scaleIndex.d.ts.map +1 -1
- package/dist/src/genome/scaleIndex.js +1 -1
- package/dist/src/genome/scaleLocus.d.ts +2 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +3 -3
- package/dist/src/genomeSpy.d.ts +12 -12
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +51 -34
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.d.ts +19 -19
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +11 -11
- package/dist/src/gl/link.vertex.glsl.js +1 -1
- package/dist/src/gl/point.fragment.glsl.js +1 -1
- package/dist/src/gl/point.vertex.glsl.js +1 -1
- package/dist/src/gl/webGLHelper.d.ts +4 -4
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +35 -14
- package/dist/src/marks/mark.d.ts +35 -32
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +26 -23
- package/dist/src/marks/markUtils.d.ts +10 -10
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +5 -5
- package/dist/src/marks/pointMark.d.ts +1 -1
- package/dist/src/marks/pointMark.d.ts.map +1 -1
- package/dist/src/marks/pointMark.js +7 -7
- package/dist/src/marks/rectMark.d.ts +2 -2
- package/dist/src/marks/rectMark.d.ts.map +1 -1
- package/dist/src/marks/rectMark.js +7 -7
- package/dist/src/marks/rule.js +6 -6
- package/dist/src/marks/text.d.ts +1 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +6 -6
- package/dist/src/scale/colorUtils.d.ts +4 -4
- package/dist/src/scale/colorUtils.d.ts.map +1 -1
- package/dist/src/scale/colorUtils.js +2 -2
- package/dist/src/scale/glslScaleGenerator.d.ts +3 -3
- package/dist/src/scale/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/scale/glslScaleGenerator.js +2 -2
- package/dist/src/scale/scale.d.ts +3 -3
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +2 -2
- package/dist/src/scale/ticks.d.ts +4 -4
- package/dist/src/scale/ticks.js +4 -4
- package/dist/src/spec/axis.d.ts +1 -1
- package/dist/src/spec/channel.d.ts +2 -2
- package/dist/src/spec/data.d.ts +2 -2
- package/dist/src/spec/mark.d.ts +36 -14
- package/dist/src/spec/root.d.ts +2 -2
- package/dist/src/spec/sampleView.d.ts +5 -5
- package/dist/src/spec/scale.d.ts +1 -1
- package/dist/src/spec/title.d.ts +1 -1
- package/dist/src/spec/view.d.ts +36 -9
- package/dist/src/tooltip/dataTooltipHandler.js +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.js +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts +1 -1
- package/dist/src/tooltip/tooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipHandler.ts +1 -1
- package/dist/src/types/embedApi.d.ts +3 -3
- package/dist/src/types/encoder.d.ts +4 -4
- package/dist/src/types/flowBatch.d.ts +1 -1
- package/dist/src/types/rendering.d.ts +3 -3
- package/dist/src/types/scaleResolutionApi.d.ts +2 -2
- package/dist/src/types/viewContext.d.ts +41 -12
- package/dist/src/utils/animator.d.ts +2 -2
- package/dist/src/utils/animator.d.ts.map +1 -1
- package/dist/src/utils/animator.js +1 -1
- package/dist/src/utils/inertia.d.ts +3 -3
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +1 -1
- package/dist/src/utils/interactionEvent.d.ts +5 -5
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +2 -2
- package/dist/src/utils/trees.js +1 -1
- package/dist/src/view/axisGridView.d.ts +17 -16
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +24 -20
- package/dist/src/view/axisResolution.d.ts +10 -10
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +6 -6
- package/dist/src/view/axisResolution.test.js +1 -1
- package/dist/src/view/axisView.d.ts +18 -17
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +39 -35
- package/dist/src/view/concatView.d.ts +5 -5
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +23 -23
- package/dist/src/view/containerView.d.ts +10 -8
- package/dist/src/view/containerView.d.ts.map +1 -1
- package/dist/src/view/containerView.js +18 -13
- package/dist/src/view/facetView.d.ts +12 -12
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +19 -19
- package/dist/src/view/flowBuilder.d.ts +4 -4
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +13 -13
- package/dist/src/view/flowBuilder.test.js +7 -7
- package/dist/src/view/gridView.d.ts +63 -35
- package/dist/src/view/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView.js +400 -113
- package/dist/src/view/layerView.d.ts +12 -14
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +55 -26
- package/dist/src/{utils → view}/layout/flexLayout.d.ts +6 -6
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/flexLayout.js +4 -4
- package/dist/src/view/layout/grid.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.d.ts +4 -4
- package/dist/src/view/layout/padding.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/padding.js +2 -2
- package/dist/src/view/layout/point.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.d.ts +8 -2
- package/dist/src/view/layout/rectangle.d.ts.map +1 -0
- package/dist/src/{utils → view}/layout/rectangle.js +22 -2
- package/dist/src/{utils → view}/layout/rectangle.test.js +8 -0
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +10 -10
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts +2 -2
- package/dist/src/view/renderingContext/compositeViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/compositeViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/debuggingViewRenderingContext.js +3 -3
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts +8 -8
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/layoutRecorderViewRenderingContext.js +4 -4
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts +6 -6
- package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/simpleViewRenderingContext.js +7 -7
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts +4 -4
- package/dist/src/view/renderingContext/svgViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/svgViewRenderingContext.js +6 -6
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts +10 -10
- package/dist/src/view/renderingContext/viewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/viewRenderingContext.js +5 -5
- package/dist/src/view/scaleResolution.d.ts +21 -17
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +33 -26
- package/dist/src/view/scaleResolution.test.js +57 -72
- package/dist/src/view/testUtils.d.ts +6 -15
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +40 -44
- package/dist/src/view/title.d.ts +3 -3
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +12 -12
- package/dist/src/view/unitView.d.ts +31 -30
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +30 -22
- package/dist/src/view/view.d.ts +86 -57
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +148 -103
- package/dist/src/view/view.test.js +9 -8
- package/dist/src/view/viewError.d.ts +9 -0
- package/dist/src/view/viewError.d.ts.map +1 -0
- package/dist/src/view/viewError.js +11 -0
- package/dist/src/view/viewFactory.d.ts +53 -20
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +148 -33
- package/dist/src/view/viewFactory.test.js +8 -0
- package/dist/src/view/viewUtils.d.ts +14 -12
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +10 -63
- package/dist/src/view/zoom.d.ts +4 -4
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +3 -3
- package/package.json +7 -5
- package/dist/src/utils/layout/flexLayout.d.ts.map +0 -1
- package/dist/src/utils/layout/grid.d.ts.map +0 -1
- package/dist/src/utils/layout/padding.d.ts.map +0 -1
- package/dist/src/utils/layout/point.d.ts.map +0 -1
- package/dist/src/utils/layout/rectangle.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.d.ts +0 -9
- package/dist/src/view/implicitRootView.d.ts.map +0 -1
- package/dist/src/view/implicitRootView.js +0 -23
- package/dist/src/view/importView.d.ts +0 -17
- package/dist/src/view/importView.d.ts.map +0 -1
- package/dist/src/view/importView.js +0 -22
- /package/dist/src/{utils → view}/layout/flexLayout.test.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/grid.js +0 -0
- /package/dist/src/{utils → view}/layout/grid.test.js +0 -0
- /package/dist/src/{utils → view}/layout/point.d.ts +0 -0
- /package/dist/src/{utils → view}/layout/point.js +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import LayerView from "./layerView.js";
|
|
2
|
-
import { FlexDimensions } from "
|
|
2
|
+
import { FlexDimensions } from "./layout/flexLayout.js";
|
|
3
3
|
|
|
4
4
|
const CHROM_LAYER_NAME = "chromosome_ticks_and_labels";
|
|
5
5
|
|
|
6
|
-
/** @type {Record<import("../spec/channel").PrimaryPositionalChannel, import("../spec/view").GeometricDimension>} */
|
|
6
|
+
/** @type {Record<import("../spec/channel.js").PrimaryPositionalChannel, import("../spec/view.js").GeometricDimension>} */
|
|
7
7
|
const CHANNEL_DIMENSIONS = {
|
|
8
8
|
x: "width",
|
|
9
9
|
y: "height",
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @param {import("../spec/channel").PrimaryPositionalChannel} channel
|
|
14
|
-
* @returns {import("../spec/channel").PrimaryPositionalChannel}
|
|
13
|
+
* @param {import("../spec/channel.js").PrimaryPositionalChannel} channel
|
|
14
|
+
* @returns {import("../spec/channel.js").PrimaryPositionalChannel}
|
|
15
15
|
*/
|
|
16
16
|
function getPerpendicularChannel(channel) {
|
|
17
17
|
return channel == "x" ? "y" : "x";
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* @type {Record<import("../spec/channel").PrimaryPositionalChannel, AxisOrient[]>}
|
|
21
|
+
* @type {Record<import("../spec/channel.js").PrimaryPositionalChannel, AxisOrient[]>}
|
|
22
22
|
*/
|
|
23
23
|
export const CHANNEL_ORIENTS = {
|
|
24
24
|
x: ["bottom", "top"],
|
|
@@ -26,7 +26,7 @@ export const CHANNEL_ORIENTS = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* @type {Record<AxisOrient, import("../spec/channel").PrimaryPositionalChannel>}
|
|
29
|
+
* @type {Record<AxisOrient, import("../spec/channel.js").PrimaryPositionalChannel>}
|
|
30
30
|
*/
|
|
31
31
|
export const ORIENT_CHANNELS = Object.fromEntries(
|
|
32
32
|
Object.entries(CHANNEL_ORIENTS)
|
|
@@ -50,24 +50,25 @@ export function orient2channel(slot) {
|
|
|
50
50
|
export default class AxisView extends LayerView {
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
|
-
* @typedef {import("../spec/view").LayerSpec} LayerSpec
|
|
54
|
-
* @typedef {import("./view").default} View
|
|
55
|
-
* @typedef {import("../spec/axis").Axis} Axis
|
|
56
|
-
* @typedef {import("../spec/axis").GenomeAxis} GenomeAxis
|
|
57
|
-
* @typedef {import("../spec/axis").AxisOrient} AxisOrient
|
|
58
|
-
* @typedef {import("
|
|
53
|
+
* @typedef {import("../spec/view.js").LayerSpec} LayerSpec
|
|
54
|
+
* @typedef {import("./view.js").default} View
|
|
55
|
+
* @typedef {import("../spec/axis.js").Axis} Axis
|
|
56
|
+
* @typedef {import("../spec/axis.js").GenomeAxis} GenomeAxis
|
|
57
|
+
* @typedef {import("../spec/axis.js").AxisOrient} AxisOrient
|
|
58
|
+
* @typedef {import("./layout/flexLayout.js").SizeDef} SizeDef
|
|
59
59
|
*
|
|
60
60
|
* @typedef {Axis & { extent: number }} AugmentedAxis
|
|
61
61
|
*/
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* @param {Axis} axisProps
|
|
65
|
-
* @param {import("../types/viewContext").default} context
|
|
65
|
+
* @param {import("../types/viewContext.js").default} context
|
|
66
66
|
* @param {string} type Data type (quantitative, ..., locus)
|
|
67
|
-
* @param {import("./containerView").default} layoutParent
|
|
68
|
-
* @param {import("./view").default} dataParent
|
|
67
|
+
* @param {import("./containerView.js").default} layoutParent
|
|
68
|
+
* @param {import("./view.js").default} dataParent
|
|
69
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
69
70
|
*/
|
|
70
|
-
constructor(axisProps, type, context, layoutParent, dataParent) {
|
|
71
|
+
constructor(axisProps, type, context, layoutParent, dataParent, options) {
|
|
71
72
|
// Now the presence of genomeAxis is based on field type, not scale type.
|
|
72
73
|
// TODO: Use scale instead. However, it would make the initialization much more
|
|
73
74
|
// complex because scales are not available before scale resolution.
|
|
@@ -89,12 +90,15 @@ export default class AxisView extends LayerView {
|
|
|
89
90
|
context,
|
|
90
91
|
layoutParent,
|
|
91
92
|
dataParent,
|
|
92
|
-
`axis_${axisProps.orient}
|
|
93
|
+
`axis_${axisProps.orient}`,
|
|
94
|
+
{
|
|
95
|
+
blockEncodingInheritance: true,
|
|
96
|
+
contributesToScaleDomain: false,
|
|
97
|
+
...options,
|
|
98
|
+
}
|
|
93
99
|
);
|
|
94
100
|
|
|
95
101
|
this.axisProps = fullAxisProps;
|
|
96
|
-
this.blockEncodingInheritance = true;
|
|
97
|
-
this.contributesToScaleDomain = false;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
104
|
getSize() {
|
|
@@ -206,9 +210,9 @@ function getDefaultAngleAndAlign(type, axisProps) {
|
|
|
206
210
|
const orient = axisProps.orient;
|
|
207
211
|
const discrete = type == "nominal" || type == "ordinal";
|
|
208
212
|
|
|
209
|
-
/** @type {import("../spec/font").Align} */
|
|
213
|
+
/** @type {import("../spec/font.js").Align} */
|
|
210
214
|
let align = "center";
|
|
211
|
-
/** @type {import("../spec/font").Baseline} */
|
|
215
|
+
/** @type {import("../spec/font.js").Baseline} */
|
|
212
216
|
let baseline = "middle";
|
|
213
217
|
|
|
214
218
|
/** @type {number} */
|
|
@@ -263,7 +267,7 @@ function createAxis(axisProps, type) {
|
|
|
263
267
|
const anchor = ap.orient == "bottom" || ap.orient == "left" ? 1 : 0;
|
|
264
268
|
|
|
265
269
|
/**
|
|
266
|
-
* @return {import("../spec/view").UnitSpec}
|
|
270
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
267
271
|
*/
|
|
268
272
|
const createDomain = () => ({
|
|
269
273
|
name: "domain",
|
|
@@ -280,7 +284,7 @@ function createAxis(axisProps, type) {
|
|
|
280
284
|
});
|
|
281
285
|
|
|
282
286
|
/**
|
|
283
|
-
* @return {import("../spec/view").UnitSpec}
|
|
287
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
284
288
|
*/
|
|
285
289
|
const createLabels = () => ({
|
|
286
290
|
name: "labels",
|
|
@@ -304,7 +308,7 @@ function createAxis(axisProps, type) {
|
|
|
304
308
|
});
|
|
305
309
|
|
|
306
310
|
/**
|
|
307
|
-
* @return {import("../spec/view").UnitSpec}
|
|
311
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
308
312
|
*/
|
|
309
313
|
const createTicks = () => ({
|
|
310
314
|
name: "ticks",
|
|
@@ -326,7 +330,7 @@ function createAxis(axisProps, type) {
|
|
|
326
330
|
});
|
|
327
331
|
|
|
328
332
|
/**
|
|
329
|
-
* @return {import("../spec/view").UnitSpec}
|
|
333
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
330
334
|
*/
|
|
331
335
|
const createTitle = () => ({
|
|
332
336
|
name: "title",
|
|
@@ -347,7 +351,7 @@ function createAxis(axisProps, type) {
|
|
|
347
351
|
});
|
|
348
352
|
|
|
349
353
|
/**
|
|
350
|
-
* @return {import("../spec/view").LayerSpec}
|
|
354
|
+
* @return {import("../spec/view.js").LayerSpec}
|
|
351
355
|
*/
|
|
352
356
|
const createTicksAndLabels = () => {
|
|
353
357
|
/** @type {LayerSpec} */
|
|
@@ -400,7 +404,7 @@ function createAxis(axisProps, type) {
|
|
|
400
404
|
return axisSpec;
|
|
401
405
|
}
|
|
402
406
|
|
|
403
|
-
/** @type {import("../spec/axis").GenomeAxis} */
|
|
407
|
+
/** @type {import("../spec/axis.js").GenomeAxis} */
|
|
404
408
|
const defaultGenomeAxisProps = {
|
|
405
409
|
...defaultAxisProps,
|
|
406
410
|
|
|
@@ -435,7 +439,7 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
435
439
|
const anchor = ap.orient == "bottom" || ap.orient == "left" ? 1 : 0;
|
|
436
440
|
|
|
437
441
|
/**
|
|
438
|
-
* @return {import("../spec/view").UnitSpec}
|
|
442
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
439
443
|
*/
|
|
440
444
|
const createChromosomeTicks = () => ({
|
|
441
445
|
name: "chromosome_ticks",
|
|
@@ -452,10 +456,10 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
452
456
|
});
|
|
453
457
|
|
|
454
458
|
/**
|
|
455
|
-
* @return {import("../spec/view").UnitSpec}
|
|
459
|
+
* @return {import("../spec/view.js").UnitSpec}
|
|
456
460
|
*/
|
|
457
461
|
const createChromosomeLabels = () => {
|
|
458
|
-
/** @type {Partial<import("../spec/mark").MarkConfig>} */
|
|
462
|
+
/** @type {Partial<import("../spec/mark.js").MarkConfig>} */
|
|
459
463
|
let chromLabelMarkProps;
|
|
460
464
|
switch (ap.orient) {
|
|
461
465
|
case "top":
|
|
@@ -507,7 +511,7 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
507
511
|
chromLabelMarkProps = {};
|
|
508
512
|
}
|
|
509
513
|
|
|
510
|
-
/** @type {import("../spec/view").UnitSpec} */
|
|
514
|
+
/** @type {import("../spec/view.js").UnitSpec} */
|
|
511
515
|
const labels = {
|
|
512
516
|
name: "chromosome_labels",
|
|
513
517
|
mark: {
|
|
@@ -566,7 +570,7 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
566
570
|
);
|
|
567
571
|
|
|
568
572
|
if (axisProps.chromTicks || axisProps.chromLabels) {
|
|
569
|
-
/** @type {import("../spec/view").LayerSpec} */
|
|
573
|
+
/** @type {import("../spec/view.js").LayerSpec} */
|
|
570
574
|
const chromLayerSpec = {
|
|
571
575
|
// TODO: Configuration
|
|
572
576
|
name: CHROM_LAYER_NAME,
|
|
@@ -590,7 +594,7 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
590
594
|
if (axisProps.chromLabels) {
|
|
591
595
|
chromLayerSpec.layer.push(createChromosomeLabels());
|
|
592
596
|
|
|
593
|
-
/** @type {import("../spec/mark").MarkConfig} */
|
|
597
|
+
/** @type {import("../spec/mark.js").MarkConfig} */
|
|
594
598
|
let labelMarkSpec;
|
|
595
599
|
|
|
596
600
|
// TODO: Simplify the following mess
|
|
@@ -601,10 +605,10 @@ export function createGenomeAxis(axisProps, type) {
|
|
|
601
605
|
.filter((view) => view.name == "labels")
|
|
602
606
|
.forEach(
|
|
603
607
|
(
|
|
604
|
-
/** @type {import("../spec/view").UnitSpec} */ view
|
|
608
|
+
/** @type {import("../spec/view.js").UnitSpec} */ view
|
|
605
609
|
) => {
|
|
606
610
|
labelMarkSpec =
|
|
607
|
-
/** @type {import("../spec/mark").MarkConfig} */ (
|
|
611
|
+
/** @type {import("../spec/mark.js").MarkConfig} */ (
|
|
608
612
|
view.mark
|
|
609
613
|
);
|
|
610
614
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
export default class ConcatView extends GridView {
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param {import("../spec/view").AnyConcatSpec} spec
|
|
8
|
-
* @param {import("../types/viewContext").default} context
|
|
9
|
-
* @param {import("./containerView").default} layoutParent
|
|
10
|
-
* @param {import("./view").default} dataParent
|
|
7
|
+
* @param {import("../spec/view.js").AnyConcatSpec} spec
|
|
8
|
+
* @param {import("../types/viewContext.js").default} context
|
|
9
|
+
* @param {import("./containerView.js").default} layoutParent
|
|
10
|
+
* @param {import("./view.js").default} dataParent
|
|
11
11
|
* @param {string} name
|
|
12
12
|
*/
|
|
13
|
-
constructor(spec: import("../spec/view").AnyConcatSpec, context: import("../types/viewContext").default, layoutParent: import("./containerView").default, dataParent: import("./view").default, name: string);
|
|
13
|
+
constructor(spec: import("../spec/view.js").AnyConcatSpec, context: import("../types/viewContext.js").default, layoutParent: import("./containerView.js").default, dataParent: import("./view.js").default, name: string);
|
|
14
14
|
}
|
|
15
15
|
import GridView from "./gridView.js";
|
|
16
16
|
//# sourceMappingURL=concatView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concatView.d.ts","sourceRoot":"","sources":["../../../src/view/concatView.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,kBANW,OAAO,
|
|
1
|
+
{"version":3,"file":"concatView.d.ts","sourceRoot":"","sources":["../../../src/view/concatView.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;IACI;;;;;;;OAOG;IACH,kBANW,OAAO,iBAAiB,EAAE,aAAa,WACvC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,OAAO,oBAAoB,EAAE,OAAO,cACpC,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,EAiBhB;CAqDJ;qBAlFoB,eAAe"}
|
|
@@ -7,10 +7,10 @@ import GridView from "./gridView.js";
|
|
|
7
7
|
export default class ConcatView extends GridView {
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
|
-
* @param {import("../spec/view").AnyConcatSpec} spec
|
|
11
|
-
* @param {import("../types/viewContext").default} context
|
|
12
|
-
* @param {import("./containerView").default} layoutParent
|
|
13
|
-
* @param {import("./view").default} dataParent
|
|
10
|
+
* @param {import("../spec/view.js").AnyConcatSpec} spec
|
|
11
|
+
* @param {import("../types/viewContext.js").default} context
|
|
12
|
+
* @param {import("./containerView.js").default} layoutParent
|
|
13
|
+
* @param {import("./view.js").default} dataParent
|
|
14
14
|
* @param {string} name
|
|
15
15
|
*/
|
|
16
16
|
constructor(spec, context, layoutParent, dataParent, name) {
|
|
@@ -30,7 +30,10 @@ export default class ConcatView extends GridView {
|
|
|
30
30
|
this.spec = spec;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @override
|
|
35
|
+
*/
|
|
36
|
+
async initializeChildren() {
|
|
34
37
|
const spec = this.spec;
|
|
35
38
|
const childSpecs = isConcatSpec(spec)
|
|
36
39
|
? spec.concat
|
|
@@ -39,17 +42,25 @@ export default class ConcatView extends GridView {
|
|
|
39
42
|
: spec.hconcat;
|
|
40
43
|
|
|
41
44
|
this.setChildren(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
await Promise.all(
|
|
46
|
+
childSpecs.map((childSpec, i) =>
|
|
47
|
+
this.context.createOrImportView(
|
|
48
|
+
childSpec,
|
|
49
|
+
this,
|
|
50
|
+
this,
|
|
51
|
+
"grid" + i
|
|
52
|
+
)
|
|
53
|
+
)
|
|
45
54
|
)
|
|
46
55
|
);
|
|
56
|
+
|
|
57
|
+
await this.createAxes();
|
|
47
58
|
}
|
|
48
59
|
|
|
49
60
|
/**
|
|
50
|
-
* @param {import("../spec/channel").Channel} channel
|
|
51
|
-
* @param {import("../spec/view").ResolutionTarget} resolutionType
|
|
52
|
-
* @returns {import("../spec/view").ResolutionBehavior}
|
|
61
|
+
* @param {import("../spec/channel.js").Channel} channel
|
|
62
|
+
* @param {import("../spec/view.js").ResolutionTarget} resolutionType
|
|
63
|
+
* @returns {import("../spec/view.js").ResolutionBehavior}
|
|
53
64
|
*/
|
|
54
65
|
getDefaultResolution(channel, resolutionType) {
|
|
55
66
|
if (resolutionType == "axis") {
|
|
@@ -65,18 +76,7 @@ export default class ConcatView extends GridView {
|
|
|
65
76
|
(isVConcatSpec(this.spec) && channel === "x") ||
|
|
66
77
|
(isHConcatSpec(this.spec) && channel === "y")
|
|
67
78
|
) {
|
|
68
|
-
|
|
69
|
-
this.children
|
|
70
|
-
.map((child) => child.getEncoding()[channel])
|
|
71
|
-
.filter((x) => x)
|
|
72
|
-
.map((e) => "type" in e && e.type)
|
|
73
|
-
.filter((type) => type)
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
return types.size === 1 &&
|
|
77
|
-
(types.has("index") || types.has("locus"))
|
|
78
|
-
? "shared"
|
|
79
|
-
: "independent";
|
|
79
|
+
return "shared";
|
|
80
80
|
} else {
|
|
81
81
|
return "independent";
|
|
82
82
|
}
|
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
export default class ContainerView extends View {
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
|
-
* @param {import("../spec/view").ContainerSpec} spec
|
|
8
|
-
* @param {import("../types/viewContext").default} context
|
|
7
|
+
* @param {import("../spec/view.js").ContainerSpec} spec
|
|
8
|
+
* @param {import("../types/viewContext.js").default} context
|
|
9
9
|
* @param {ContainerView} layoutParent
|
|
10
|
-
* @param {import("./view").default} dataParent
|
|
10
|
+
* @param {import("./view.js").default} dataParent
|
|
11
11
|
* @param {string} name
|
|
12
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
12
13
|
*/
|
|
13
|
-
constructor(spec: import("../spec/view").ContainerSpec, context: import("../types/viewContext").default, layoutParent: ContainerView, dataParent: import("./view").default, name: string);
|
|
14
|
-
spec: import("../spec/view").ContainerSpec;
|
|
14
|
+
constructor(spec: import("../spec/view.js").ContainerSpec, context: import("../types/viewContext.js").default, layoutParent: ContainerView, dataParent: import("./view.js").default, name: string, options?: import("./view.js").ViewOptions);
|
|
15
|
+
spec: import("../spec/view.js").ContainerSpec;
|
|
16
|
+
initializeChildren(): Promise<void>;
|
|
15
17
|
/**
|
|
16
18
|
* Replaces a child view with another one. Does not alter the old or new child.
|
|
17
19
|
*
|
|
18
|
-
* @param {import("./view").default} child
|
|
19
|
-
* @param {import("./view").default} replacement
|
|
20
|
+
* @param {import("./view.js").default} child
|
|
21
|
+
* @param {import("./view.js").default} replacement
|
|
20
22
|
*/
|
|
21
|
-
replaceChild(child: import("./view").default, replacement: import("./view").default): void;
|
|
23
|
+
replaceChild(child: import("./view.js").default, replacement: import("./view.js").default): void;
|
|
22
24
|
/**
|
|
23
25
|
* @param {string[]} path An array of view names
|
|
24
26
|
* @returns {View}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerView.d.ts","sourceRoot":"","sources":["../../../src/view/containerView.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI
|
|
1
|
+
{"version":3,"file":"containerView.d.ts","sourceRoot":"","sources":["../../../src/view/containerView.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;;;;;;OAQG;IACH,kBAPW,OAAO,iBAAiB,EAAE,aAAa,WACvC,OAAO,yBAAyB,EAAE,OAAO,gBACzC,aAAa,cACb,OAAO,WAAW,EAAE,OAAO,QAC3B,MAAM,YACN,OAAO,WAAW,EAAE,WAAW,EAMzC;IADG,8CAAgB;IAGpB,oCAEC;IASD;;;;;OAKG;IACH,oBAHW,OAAO,WAAW,EAAE,OAAO,eAC3B,OAAO,WAAW,EAAE,OAAO,QAIrC;IA+CD;;;OAGG;IACH,2BAHW,MAAM,EAAE,GACN,IAAI,CAYhB;IAED;;;OAGG;IACH,sBAFW,MAAM,QAQhB;IAED;;;OAGG;IACH,2BAFW,MAAM,QAchB;IA1GD;;OAEG;IACH,qBAFa,iBAAiB,IAAI,CAAC,CAIlC;CA+GJ;iBA7I4C,WAAW"}
|
|
@@ -6,18 +6,23 @@ import View, { VISIT_STOP, VISIT_SKIP } from "./view.js";
|
|
|
6
6
|
export default class ContainerView extends View {
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
|
-
* @param {import("../spec/view").ContainerSpec} spec
|
|
10
|
-
* @param {import("../types/viewContext").default} context
|
|
9
|
+
* @param {import("../spec/view.js").ContainerSpec} spec
|
|
10
|
+
* @param {import("../types/viewContext.js").default} context
|
|
11
11
|
* @param {ContainerView} layoutParent
|
|
12
|
-
* @param {import("./view").default} dataParent
|
|
12
|
+
* @param {import("./view.js").default} dataParent
|
|
13
13
|
* @param {string} name
|
|
14
|
+
* @param {import("./view.js").ViewOptions} [options]
|
|
14
15
|
*/
|
|
15
|
-
constructor(spec, context, layoutParent, dataParent, name) {
|
|
16
|
-
super(spec, context, layoutParent, dataParent, name);
|
|
16
|
+
constructor(spec, context, layoutParent, dataParent, name, options) {
|
|
17
|
+
super(spec, context, layoutParent, dataParent, name, options);
|
|
17
18
|
|
|
18
19
|
this.spec = spec;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
async initializeChildren() {
|
|
23
|
+
// override
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* @returns {IterableIterator<View>}
|
|
23
28
|
*/
|
|
@@ -28,8 +33,8 @@ export default class ContainerView extends View {
|
|
|
28
33
|
/**
|
|
29
34
|
* Replaces a child view with another one. Does not alter the old or new child.
|
|
30
35
|
*
|
|
31
|
-
* @param {import("./view").default} child
|
|
32
|
-
* @param {import("./view").default} replacement
|
|
36
|
+
* @param {import("./view.js").default} child
|
|
37
|
+
* @param {import("./view.js").default} replacement
|
|
33
38
|
*/
|
|
34
39
|
replaceChild(child, replacement) {
|
|
35
40
|
throw new Error("Not implemented");
|
|
@@ -40,11 +45,11 @@ export default class ContainerView extends View {
|
|
|
40
45
|
* the value if the visitor returns a defined value. The `afterChildren` callback
|
|
41
46
|
* allows for post-order traversal
|
|
42
47
|
*
|
|
43
|
-
* @param {import("./view").Visitor} visitor
|
|
44
|
-
* @returns {import("./view").VisitResult}
|
|
48
|
+
* @param {import("./view.js").Visitor} visitor
|
|
49
|
+
* @returns {import("./view.js").VisitResult}
|
|
45
50
|
*/
|
|
46
51
|
visit(visitor) {
|
|
47
|
-
/** @type {import("./view").VisitResult}*/
|
|
52
|
+
/** @type {import("./view.js").VisitResult}*/
|
|
48
53
|
let result;
|
|
49
54
|
try {
|
|
50
55
|
result = visitor(this);
|
|
@@ -127,9 +132,9 @@ export default class ContainerView extends View {
|
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
/**
|
|
130
|
-
* @param {import("../spec/channel").Channel} channel
|
|
131
|
-
* @param {import("../spec/view").ResolutionTarget} resolutionType
|
|
132
|
-
* @returns {import("../spec/view").ResolutionBehavior}
|
|
135
|
+
* @param {import("../spec/channel.js").Channel} channel
|
|
136
|
+
* @param {import("../spec/view.js").ResolutionTarget} resolutionType
|
|
137
|
+
* @returns {import("../spec/view.js").ResolutionBehavior}
|
|
133
138
|
*/
|
|
134
139
|
getDefaultResolution(channel, resolutionType) {
|
|
135
140
|
return "shared";
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export default class FacetView extends ContainerView {
|
|
17
17
|
/**
|
|
18
|
-
* @typedef {import("./view").default} View
|
|
19
|
-
* @typedef {import("./layerView").default} LayerView
|
|
20
|
-
* @typedef {import("./viewUtils").FacetFieldDef} FacetFieldDef
|
|
21
|
-
* @typedef {import("./viewUtils").FacetMapping} FacetMapping
|
|
22
|
-
* @typedef {import("
|
|
23
|
-
* @typedef {import("
|
|
18
|
+
* @typedef {import("./view.js").default} View
|
|
19
|
+
* @typedef {import("./layerView.js").default} LayerView
|
|
20
|
+
* @typedef {import("./viewUtils.js").FacetFieldDef} FacetFieldDef
|
|
21
|
+
* @typedef {import("./viewUtils.js").FacetMapping} FacetMapping
|
|
22
|
+
* @typedef {import("./layout/flexLayout.js").LocSize} LocSize
|
|
23
|
+
* @typedef {import("./layout/flexLayout.js").SizeDef} SizeDef
|
|
24
24
|
*/
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @param {import("./viewUtils").FacetSpec} spec
|
|
28
|
-
* @param {import("./viewUtils").ViewContext} context
|
|
27
|
+
* @param {import("./viewUtils.js").FacetSpec} spec
|
|
28
|
+
* @param {import("./viewUtils.js").ViewContext} context
|
|
29
29
|
* @param {ContainerView} parent
|
|
30
30
|
* @param {string} name
|
|
31
31
|
*/
|
|
@@ -50,11 +50,11 @@ export default class FacetView extends ContainerView {
|
|
|
50
50
|
updateLabels(): void;
|
|
51
51
|
getFacetGroups(): any[];
|
|
52
52
|
/**
|
|
53
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
54
|
-
* @param {import("
|
|
55
|
-
* @param {import("./view").RenderingOptions} [options]
|
|
53
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
54
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
55
|
+
* @param {import("./view.js").RenderingOptions} [options]
|
|
56
56
|
*/
|
|
57
|
-
render(context: import("./renderingContext/viewRenderingContext").default, coords: import("
|
|
57
|
+
render(context: import("./renderingContext/viewRenderingContext.js").default, coords: import("./layout/rectangle.js").default, options?: any): void;
|
|
58
58
|
_labelsUpdated: boolean;
|
|
59
59
|
}
|
|
60
60
|
export type FacetChannel = "column" | "row";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facetView.d.ts","sourceRoot":"","sources":["../../../src/view/facetView.js"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;GAcG;AACH;IACI;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,6CAHW,aAAa,QACb,MAAM,EA8BhB;IAzBG,UAAgB;IAEhB,WAEC;IAED;;;;OAIG;IACH,aAFU,OAAO,YAAY,EAAE,QAAQ,CAAC,CAYvC;IAED,oDAAoD;IACpD,kBADY,OAAO,YAAY,EAAE,cAAc,CAAC,CACa;IA2BjE,sBAIC;IAED;;;OAGG;IACH,qBAFW,KAAK,GAAG,QAAQ,0CAwB1B;IAED,qBAyCC;IAED,qBASC;IA6BD,wBAgBC;IAOD;;;;OAIG;IACH,gBAJW,OAAO,
|
|
1
|
+
{"version":3,"file":"facetView.d.ts","sourceRoot":"","sources":["../../../src/view/facetView.js"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;GAcG;AACH;IACI;;;;;;;OAOG;IACH;;;;;;OAMG;IACH,6CAHW,aAAa,QACb,MAAM,EA8BhB;IAzBG,UAAgB;IAEhB,WAEC;IAED;;;;OAIG;IACH,aAFU,OAAO,YAAY,EAAE,QAAQ,CAAC,CAYvC;IAED,oDAAoD;IACpD,kBADY,OAAO,YAAY,EAAE,cAAc,CAAC,CACa;IA2BjE,sBAIC;IAED;;;OAGG;IACH,qBAFW,KAAK,GAAG,QAAQ,0CAwB1B;IAED,qBAyCC;IAED,qBASC;IA6BD,wBAgBC;IAOD;;;;OAIG;IACH,gBAJW,OAAO,4CAA4C,EAAE,OAAO,UAC5D,OAAO,uBAAuB,EAAE,OAAO,uBA4LjD;IA3KO,wBAA0B;CA4KrC;2BA/bY,QAAQ,GAAG,KAAK;;;;;;aA4CnB,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE;;;0BA1Df,oBAAoB;qBACzB,eAAe"}
|
|
@@ -5,13 +5,13 @@ import { isFacetFieldDef, isFacetMapping } from "./viewUtils.js";
|
|
|
5
5
|
import ContainerView from "./containerView.js";
|
|
6
6
|
import UnitView from "./unitView.js";
|
|
7
7
|
import { cross } from "d3-array";
|
|
8
|
-
import { mapToPixelCoords } from "
|
|
8
|
+
import { mapToPixelCoords } from "./layout/flexLayout.js";
|
|
9
9
|
import { OrdinalDomain } from "../utils/domainArray.js";
|
|
10
|
-
import Rectangle from "
|
|
10
|
+
import Rectangle from "./layout/rectangle.js";
|
|
11
11
|
import coalesce from "../utils/coalesce.js";
|
|
12
12
|
import { field as vegaField } from "vega-util";
|
|
13
13
|
import DecoratorView from "./decoratorView.js";
|
|
14
|
-
import Padding from "
|
|
14
|
+
import Padding from "./layout/padding.js";
|
|
15
15
|
|
|
16
16
|
const DEFAULT_SPACING = 20;
|
|
17
17
|
|
|
@@ -66,17 +66,17 @@ const headerConfigs = {
|
|
|
66
66
|
*/
|
|
67
67
|
export default class FacetView extends ContainerView {
|
|
68
68
|
/**
|
|
69
|
-
* @typedef {import("./view").default} View
|
|
70
|
-
* @typedef {import("./layerView").default} LayerView
|
|
71
|
-
* @typedef {import("./viewUtils").FacetFieldDef} FacetFieldDef
|
|
72
|
-
* @typedef {import("./viewUtils").FacetMapping} FacetMapping
|
|
73
|
-
* @typedef {import("
|
|
74
|
-
* @typedef {import("
|
|
69
|
+
* @typedef {import("./view.js").default} View
|
|
70
|
+
* @typedef {import("./layerView.js").default} LayerView
|
|
71
|
+
* @typedef {import("./viewUtils.js").FacetFieldDef} FacetFieldDef
|
|
72
|
+
* @typedef {import("./viewUtils.js").FacetMapping} FacetMapping
|
|
73
|
+
* @typedef {import("./layout/flexLayout.js").LocSize} LocSize
|
|
74
|
+
* @typedef {import("./layout/flexLayout.js").SizeDef} SizeDef
|
|
75
75
|
*/
|
|
76
76
|
/**
|
|
77
77
|
*
|
|
78
|
-
* @param {import("./viewUtils").FacetSpec} spec
|
|
79
|
-
* @param {import("./viewUtils").ViewContext} context
|
|
78
|
+
* @param {import("./viewUtils.js").FacetSpec} spec
|
|
79
|
+
* @param {import("./viewUtils.js").ViewContext} context
|
|
80
80
|
* @param {ContainerView} parent
|
|
81
81
|
* @param {string} name
|
|
82
82
|
*/
|
|
@@ -121,8 +121,8 @@ export default class FacetView extends ContainerView {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* @param {import("./view").default} child
|
|
125
|
-
* @param {import("./view").default} replacement
|
|
124
|
+
* @param {import("./view.js").default} child
|
|
125
|
+
* @param {import("./view.js").default} replacement
|
|
126
126
|
*/
|
|
127
127
|
replaceChild(child, replacement) {
|
|
128
128
|
if (child !== this.child) {
|
|
@@ -145,7 +145,7 @@ export default class FacetView extends ContainerView {
|
|
|
145
145
|
* @param {"row" | "column"} channel
|
|
146
146
|
*/
|
|
147
147
|
getAccessor(channel) {
|
|
148
|
-
/** @type {import("./viewUtils").FacetMapping} */
|
|
148
|
+
/** @type {import("./viewUtils.js").FacetMapping} */
|
|
149
149
|
let facetMapping;
|
|
150
150
|
if (isFacetMapping(this.spec.facet)) {
|
|
151
151
|
facetMapping = this.spec.facet; // Mark provides encodings with defaults and possible modifications
|
|
@@ -169,7 +169,7 @@ export default class FacetView extends ContainerView {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
updateFacets() {
|
|
172
|
-
/** @type {import("./viewUtils").FacetMapping} */
|
|
172
|
+
/** @type {import("./viewUtils.js").FacetMapping} */
|
|
173
173
|
let facetMapping;
|
|
174
174
|
if (isFacetMapping(this.spec.facet)) {
|
|
175
175
|
facetMapping = this.spec.facet; // Mark provides encodings with defaults and possible modifications
|
|
@@ -273,9 +273,9 @@ export default class FacetView extends ContainerView {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
/**
|
|
276
|
-
* @param {import("./renderingContext/viewRenderingContext").default} context
|
|
277
|
-
* @param {import("
|
|
278
|
-
* @param {import("./view").RenderingOptions} [options]
|
|
276
|
+
* @param {import("./renderingContext/viewRenderingContext.js").default} context
|
|
277
|
+
* @param {import("./layout/rectangle.js").default} coords
|
|
278
|
+
* @param {import("./view.js").RenderingOptions} [options]
|
|
279
279
|
*/
|
|
280
280
|
render(context, coords, options = {}) {
|
|
281
281
|
if (!this.isConfiguredVisible()) {
|
|
@@ -471,7 +471,7 @@ export default class FacetView extends ContainerView {
|
|
|
471
471
|
function createLabelViewSpec(headerConfig) {
|
|
472
472
|
// TODO: Support styling: https://vega.github.io/vega-lite/docs/header.html#labels
|
|
473
473
|
|
|
474
|
-
/** @type {import("./viewUtils").UnitSpec} */
|
|
474
|
+
/** @type {import("./viewUtils.js").UnitSpec} */
|
|
475
475
|
const titleView = {
|
|
476
476
|
data: {
|
|
477
477
|
values: [],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {DataFlow<View>} [existingFlow] Add data flow
|
|
4
4
|
* graphs to an existing DataFlow object.
|
|
5
5
|
*/
|
|
6
|
-
export function buildDataFlow(root: import("./view").default, existingFlow?: DataFlow<import("./view").default>): DataFlow<import("./view").default>;
|
|
6
|
+
export function buildDataFlow(root: import("./view.js").default, existingFlow?: DataFlow<import("./view.js").default>): DataFlow<import("./view.js").default>;
|
|
7
7
|
/**
|
|
8
8
|
* Changes the ChromPos channelDefs into FieldDefs and returns
|
|
9
9
|
* LinearizeGenomicCoordinate transform(s) that should be inserted into
|
|
@@ -11,9 +11,9 @@ export function buildDataFlow(root: import("./view").default, existingFlow?: Dat
|
|
|
11
11
|
*
|
|
12
12
|
* @param {View} view
|
|
13
13
|
*/
|
|
14
|
-
export function linearizeLocusAccess(view: import("./view").default): {
|
|
14
|
+
export function linearizeLocusAccess(view: import("./view.js").default): {
|
|
15
15
|
transforms: import("../data/flowNode.js").default[];
|
|
16
|
-
rewrittenEncoding: import("../spec/channel").Encoding<string>;
|
|
16
|
+
rewrittenEncoding: import("../spec/channel.js").Encoding<string>;
|
|
17
17
|
/**
|
|
18
18
|
* Should be called after the whole flow has been created in order to
|
|
19
19
|
* not disrupt inheritance of encodings
|
|
@@ -30,7 +30,7 @@ export function linearizeLocusAccess(view: import("./view").default): {
|
|
|
30
30
|
export function createChain<H extends import("../data/flowNode.js").default>(dataSource: H, ...transforms: import("../data/flowNode.js").default[]): {
|
|
31
31
|
dataSource: H;
|
|
32
32
|
collector: Collector;
|
|
33
|
-
loadAndCollect: () => Promise<Iterable<import("../data/flowNode").Datum>>;
|
|
33
|
+
loadAndCollect: () => Promise<Iterable<import("../data/flowNode.js").Datum>>;
|
|
34
34
|
};
|
|
35
35
|
import DataFlow from "../data/dataFlow.js";
|
|
36
36
|
import Collector from "../data/collector.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowBuilder.d.ts","sourceRoot":"","sources":["../../../src/view/flowBuilder.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"flowBuilder.d.ts","sourceRoot":"","sources":["../../../src/view/flowBuilder.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,8JAkKC;AAED;;;;;;GAMG;AACH;;;IAgGc;;;OAGG;;EAYhB;AA0BD;;;;;;GAMG;AACH;;;0BAqB0B,QAAQ,SAAS,OAAO,qBAAqB,EAAE,KAAK,CAAC,CAAC;EAkB/E;qBAxXoB,qBAAqB;sBANpB,sBAAsB"}
|