@genome-spy/core 0.73.0 → 0.74.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/AbortablePromiseCache-3gHJdF3E.js +96 -0
- package/dist/bundle/browser-BTgw5ieH.js +126 -0
- package/dist/bundle/chunk-DmhlhrBa.js +11 -0
- package/dist/bundle/esm-BDFRLEuD.js +1248 -0
- package/dist/bundle/esm-BygJiwh0.js +573 -0
- package/dist/bundle/esm-CGX-qz1d.js +155 -0
- package/dist/bundle/esm-CgfVIRJ-.js +121 -0
- package/dist/bundle/esm-CuMSzCHy.js +298 -0
- package/dist/bundle/esm-DMXpJXM4.js +369 -0
- package/dist/bundle/esm-DQiq2Zhd.js +1426 -0
- package/dist/bundle/esm-DtE8VqAv.js +1015 -0
- package/dist/bundle/esm-sIoQYZ21.js +461 -0
- package/dist/bundle/index.es.js +21071 -25935
- package/dist/bundle/index.js +363 -379
- package/dist/bundle/parquetRead-DG_-F5j5.js +1609 -0
- package/dist/schema.json +13098 -7095
- package/dist/src/config/axisConfig.d.ts +16 -0
- package/dist/src/config/axisConfig.d.ts.map +1 -0
- package/dist/src/config/axisConfig.js +84 -0
- package/dist/src/config/defaultConfig.d.ts +3 -0
- package/dist/src/config/defaultConfig.d.ts.map +1 -0
- package/dist/src/config/defaultConfig.js +38 -0
- package/dist/src/config/defaults/axisDefaults.d.ts +5 -0
- package/dist/src/config/defaults/axisDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/axisDefaults.js +72 -0
- package/dist/src/config/defaults/markDefaults.d.ts +15 -0
- package/dist/src/config/defaults/markDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/markDefaults.js +121 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/scaleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/scaleDefaults.js +18 -0
- package/dist/src/config/defaults/titleDefaults.d.ts +5 -0
- package/dist/src/config/defaults/titleDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/titleDefaults.js +47 -0
- package/dist/src/config/defaults/viewDefaults.d.ts +3 -0
- package/dist/src/config/defaults/viewDefaults.d.ts.map +1 -0
- package/dist/src/config/defaults/viewDefaults.js +2 -0
- package/dist/src/config/markConfig.d.ts +8 -0
- package/dist/src/config/markConfig.d.ts.map +1 -0
- package/dist/src/config/markConfig.js +27 -0
- package/dist/src/config/mergeConfig.d.ts +8 -0
- package/dist/src/config/mergeConfig.d.ts.map +1 -0
- package/dist/src/config/mergeConfig.js +81 -0
- package/dist/src/config/resolveConfig.d.ts +22 -0
- package/dist/src/config/resolveConfig.d.ts.map +1 -0
- package/dist/src/config/resolveConfig.js +32 -0
- package/dist/src/config/scaleConfig.d.ts +40 -0
- package/dist/src/config/scaleConfig.d.ts.map +1 -0
- package/dist/src/config/scaleConfig.js +220 -0
- package/dist/src/config/styleUtils.d.ts +6 -0
- package/dist/src/config/styleUtils.d.ts.map +1 -0
- package/dist/src/config/styleUtils.js +10 -0
- package/dist/src/config/themes.d.ts +15 -0
- package/dist/src/config/themes.d.ts.map +1 -0
- package/dist/src/config/themes.js +293 -0
- package/dist/src/config/titleConfig.d.ts +12 -0
- package/dist/src/config/titleConfig.d.ts.map +1 -0
- package/dist/src/config/titleConfig.js +42 -0
- package/dist/src/config/viewConfig.d.ts +7 -0
- package/dist/src/config/viewConfig.d.ts.map +1 -0
- package/dist/src/config/viewConfig.js +29 -0
- package/dist/src/data/flowNode.d.ts +22 -1
- package/dist/src/data/flowNode.d.ts.map +1 -1
- package/dist/src/data/flowNode.js +37 -1
- package/dist/src/data/formats/bed.d.ts.map +1 -1
- package/dist/src/data/formats/bed.js +6 -1
- package/dist/src/data/formats/bedpe.d.ts.map +1 -1
- package/dist/src/data/formats/bedpe.js +4 -0
- package/dist/src/data/formats/fasta.d.ts.map +1 -1
- package/dist/src/data/formats/fasta.js +4 -0
- package/dist/src/data/formats/parquet.d.ts.map +1 -1
- package/dist/src/data/formats/parquet.js +4 -0
- package/dist/src/data/sources/dataSourceFactory.d.ts +2 -13
- package/dist/src/data/sources/dataSourceFactory.d.ts.map +1 -1
- package/dist/src/data/sources/dataSourceFactory.js +5 -141
- package/dist/src/data/sources/lazy/axisGenomeSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisGenomeSource.js +11 -0
- package/dist/src/data/sources/lazy/axisTickSource.d.ts +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/axisTickSource.js +19 -8
- package/dist/src/data/sources/lazy/bamSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bamSource.js +11 -0
- package/dist/src/data/sources/lazy/bigBedSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +12 -1
- package/dist/src/data/sources/lazy/bigWigSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +11 -0
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +12 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +11 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts +27 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/lazyDataSourceRegistry.js +65 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts +2 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.d.ts.map +1 -0
- package/dist/src/data/sources/lazy/registerBuiltInLazySources.js +8 -0
- package/dist/src/data/sources/lazy/singleAxisLazySource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/singleAxisLazySource.js +11 -2
- package/dist/src/data/sources/lazy/vcfSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/vcfSource.js +11 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +5 -2
- package/dist/src/data/transforms/aggregate.d.ts +1 -0
- package/dist/src/data/transforms/aggregate.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregate.js +30 -8
- package/dist/src/data/transforms/aggregateOps.d.ts.map +1 -1
- package/dist/src/data/transforms/aggregateOps.js +12 -1
- package/dist/src/data/transforms/coverage.js +2 -2
- package/dist/src/data/transforms/filter.js +1 -1
- package/dist/src/data/transforms/filterScoredLabels.d.ts +6 -0
- package/dist/src/data/transforms/filterScoredLabels.d.ts.map +1 -1
- package/dist/src/data/transforms/filterScoredLabels.js +9 -0
- package/dist/src/data/transforms/measureText.d.ts +1 -0
- package/dist/src/data/transforms/measureText.d.ts.map +1 -1
- package/dist/src/data/transforms/measureText.js +14 -5
- package/dist/src/data/transforms/pileup.d.ts.map +1 -1
- package/dist/src/data/transforms/pileup.js +1 -2
- package/dist/src/data/transforms/regexFold.d.ts.map +1 -1
- package/dist/src/data/transforms/regexFold.js +0 -1
- package/dist/src/embedFactory.d.ts +13 -0
- package/dist/src/embedFactory.d.ts.map +1 -0
- package/dist/src/embedFactory.js +127 -0
- package/dist/src/encoder/accessor.d.ts +3 -12
- package/dist/src/encoder/accessor.d.ts.map +1 -1
- package/dist/src/encoder/accessor.js +10 -65
- package/dist/src/encoder/encoder.d.ts +51 -8
- package/dist/src/encoder/encoder.d.ts.map +1 -1
- package/dist/src/encoder/encoder.js +179 -55
- package/dist/src/fonts/bmFontManager.js +1 -1
- package/dist/src/full.d.ts +2 -0
- package/dist/src/full.d.ts.map +1 -0
- package/dist/src/full.js +2 -0
- package/dist/src/genome/genome.d.ts +8 -0
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +16 -2
- package/dist/src/genome/genomeStore.js +1 -1
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -1
- package/dist/src/genome/rootGenomeConfig.js +6 -2
- package/dist/src/genome/scaleLocus.d.ts.map +1 -1
- package/dist/src/genome/scaleLocus.js +26 -7
- package/dist/src/genomeSpy/cursorManager.d.ts +69 -0
- package/dist/src/genomeSpy/cursorManager.d.ts.map +1 -0
- package/dist/src/genomeSpy/cursorManager.js +131 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts +113 -0
- package/dist/src/genomeSpy/headlessBootstrap.d.ts.map +1 -0
- package/dist/src/genomeSpy/headlessBootstrap.js +246 -0
- package/dist/src/genomeSpy/interactionController.d.ts +5 -0
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +212 -19
- package/dist/src/genomeSpy/interactionDispatcher.d.ts +50 -0
- package/dist/src/genomeSpy/interactionDispatcher.d.ts.map +1 -0
- package/dist/src/genomeSpy/interactionDispatcher.js +203 -0
- package/dist/src/genomeSpy/viewContextFactory.d.ts +4 -2
- package/dist/src/genomeSpy/viewContextFactory.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewContextFactory.js +12 -4
- package/dist/src/genomeSpy/viewDataInit.d.ts.map +1 -1
- package/dist/src/genomeSpy/viewDataInit.js +7 -3
- package/dist/src/genomeSpy.d.ts +1 -124
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +7 -688
- package/dist/src/genomeSpyBase.d.ts +133 -0
- package/dist/src/genomeSpyBase.d.ts.map +1 -0
- package/dist/src/genomeSpyBase.js +719 -0
- package/dist/src/gl/arrayBuilder.d.ts.map +1 -1
- package/dist/src/gl/arrayBuilder.js +0 -3
- package/dist/src/gl/colorUtils.d.ts.map +1 -1
- package/dist/src/gl/colorUtils.js +3 -0
- package/dist/src/gl/dataToVertices.d.ts.map +1 -1
- package/dist/src/gl/dataToVertices.js +13 -8
- package/dist/src/gl/glslScaleGenerator.d.ts +2 -2
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +5 -7
- package/dist/src/index.d.ts +3 -9
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -114
- package/dist/src/marks/__snapshots__/shaderSnapshot.test.js.snap +4462 -0
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +0 -23
- package/dist/src/marks/mark.d.ts +8 -1
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +61 -20
- package/dist/src/marks/markUtils.d.ts +18 -1
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +52 -4
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +6 -26
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.js +13 -21
- package/dist/src/marks/rule.d.ts +7 -2
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +125 -16
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.js +5 -47
- package/dist/src/minimal.d.ts +8 -0
- package/dist/src/minimal.d.ts.map +1 -0
- package/dist/src/minimal.js +21 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts +19 -0
- package/dist/src/paramRuntime/viewParamRuntime.d.ts.map +1 -1
- package/dist/src/paramRuntime/viewParamRuntime.js +35 -0
- package/dist/src/scale/scale.d.ts.map +1 -1
- package/dist/src/scale/scale.js +13 -7
- package/dist/src/scales/axisResolution.d.ts.map +1 -1
- package/dist/src/scales/axisResolution.js +9 -5
- package/dist/src/scales/domainPlanner.d.ts +28 -8
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +207 -73
- package/dist/src/scales/indexLikeDomainUtils.d.ts +29 -0
- package/dist/src/scales/indexLikeDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/indexLikeDomainUtils.js +67 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts +15 -0
- package/dist/src/scales/resolutionMemberOrder.d.ts.map +1 -0
- package/dist/src/scales/resolutionMemberOrder.js +22 -0
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +43 -4
- package/dist/src/scales/scalePropsResolver.d.ts +3 -1
- package/dist/src/scales/scalePropsResolver.d.ts.map +1 -1
- package/dist/src/scales/scalePropsResolver.js +83 -6
- package/dist/src/scales/scaleResolution.d.ts +23 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +220 -58
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -1
- package/dist/src/scales/scaleResolutionTestUtils.js +6 -2
- package/dist/src/scales/scaleRules.d.ts.map +1 -1
- package/dist/src/scales/scaleRules.js +16 -2
- package/dist/src/scales/selectionDomainUtils.d.ts +30 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -1
- package/dist/src/scales/selectionDomainUtils.js +116 -1
- package/dist/src/screenshotHarness.js +3 -4
- package/dist/src/spec/axis.d.ts +41 -30
- package/dist/src/spec/channel.d.ts +15 -9
- package/dist/src/spec/config.d.ts +264 -0
- package/dist/src/spec/data.d.ts +7 -0
- package/dist/src/spec/decoration.d.ts +51 -0
- package/dist/src/spec/exampleFiles.d.ts +12 -0
- package/dist/src/spec/exampleFiles.d.ts.map +1 -0
- package/dist/src/spec/exampleFiles.js +52 -0
- package/dist/src/spec/font.d.ts +1 -1
- package/dist/src/spec/mark.d.ts +97 -13
- package/dist/src/spec/parameter.d.ts +30 -10
- package/dist/src/spec/root.d.ts +14 -0
- package/dist/src/spec/scale.d.ts +18 -13
- package/dist/src/spec/title.d.ts +13 -2
- package/dist/src/spec/tooltip.d.ts +1 -1
- package/dist/src/spec/transform.d.ts +39 -4
- package/dist/src/spec/view.d.ts +67 -19
- package/dist/src/styles/genome-spy.css +55 -55
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +23 -22
- package/dist/src/testSetup.d.ts +2 -0
- package/dist/src/testSetup.d.ts.map +1 -0
- package/dist/src/testSetup.js +5 -0
- package/dist/src/tooltip/dataTooltipHandler.js +8 -2
- package/dist/src/tooltip/tooltipContext.d.ts.map +1 -1
- package/dist/src/tooltip/tooltipContext.js +3 -2
- package/dist/src/types/embedApi.d.ts +7 -0
- package/dist/src/types/encoder.d.ts +17 -15
- package/dist/src/types/scaleResolutionApi.d.ts +20 -0
- package/dist/src/types/viewContext.d.ts +23 -1
- package/dist/src/utils/expression.d.ts +2 -2
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +63 -8
- package/dist/src/utils/field.d.ts.map +1 -1
- package/dist/src/utils/field.js +0 -1
- package/dist/src/utils/inertia.d.ts.map +1 -1
- package/dist/src/utils/inertia.js +0 -1
- package/dist/src/utils/inputBinding.d.ts +1 -1
- package/dist/src/utils/interaction.d.ts +109 -0
- package/dist/src/utils/interaction.d.ts.map +1 -0
- package/dist/src/utils/interaction.js +200 -0
- package/dist/src/utils/interactionEvent.d.ts +21 -42
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +43 -66
- package/dist/src/utils/kWayMerge.js +1 -1
- package/dist/src/utils/mergeObjects.d.ts.map +1 -1
- package/dist/src/utils/mergeObjects.js +0 -2
- package/dist/src/utils/radixSort.d.ts.map +1 -1
- package/dist/src/utils/radixSort.js +0 -2
- package/dist/src/utils/throttle.d.ts.map +1 -1
- package/dist/src/utils/throttle.js +0 -2
- package/dist/src/utils/ui/tooltip.d.ts +1 -0
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +1 -0
- package/dist/src/utils/url.js +1 -1
- package/dist/src/view/axisGridView.d.ts +1 -1
- package/dist/src/view/axisGridView.d.ts.map +1 -1
- package/dist/src/view/axisGridView.js +2 -47
- package/dist/src/view/axisView.d.ts +2 -3
- package/dist/src/view/axisView.d.ts.map +1 -1
- package/dist/src/view/axisView.js +251 -106
- package/dist/src/view/concatView.d.ts +2 -1
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +4 -2
- package/dist/src/view/containerMutationHelper.d.ts +3 -0
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +4 -1
- package/dist/src/view/facetView.d.ts +1 -1
- package/dist/src/view/facetView.js +3 -3
- package/dist/src/view/flowBuilder.js +2 -2
- package/dist/src/view/gridView/gridChild.d.ts +6 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +72 -43
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +255 -101
- package/dist/src/view/gridView/keyboardZoomController.d.ts +2 -2
- package/dist/src/view/gridView/keyboardZoomController.d.ts.map +1 -1
- package/dist/src/view/gridView/keyboardZoomController.js +1 -1
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -1
- package/dist/src/view/gridView/scrollbar.js +4 -2
- package/dist/src/view/gridView/selectionRect.d.ts +4 -0
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +20 -1
- package/dist/src/view/gridView/separatorView.d.ts +1 -0
- package/dist/src/view/gridView/separatorView.d.ts.map +1 -1
- package/dist/src/view/gridView/separatorView.js +9 -0
- package/dist/src/view/interactionRouting.d.ts +20 -0
- package/dist/src/view/interactionRouting.d.ts.map +1 -0
- package/dist/src/view/interactionRouting.js +53 -0
- package/dist/src/view/layerView.d.ts.map +1 -1
- package/dist/src/view/layerView.js +12 -9
- package/dist/src/view/layout/grid.js +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
- package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +0 -2
- package/dist/src/view/testUtils.d.ts +17 -3
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +62 -69
- package/dist/src/view/title.d.ts +8 -1
- package/dist/src/view/title.d.ts.map +1 -1
- package/dist/src/view/title.js +66 -76
- package/dist/src/view/unitView.d.ts +1 -1
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +67 -17
- package/dist/src/view/view.d.ts +76 -30
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +136 -47
- package/dist/src/view/viewFactory.d.ts +11 -3
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +37 -11
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +41 -5
- package/dist/src/view/zoom.d.ts +2 -2
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +21 -23
- package/package.json +18 -10
- package/dist/bundle/AbortablePromiseCache-Dj0vzLnp.js +0 -149
- package/dist/bundle/browser-0iNU5Wit.js +0 -138
- package/dist/bundle/index-BYsZN7b0.js +0 -1597
- package/dist/bundle/index-C3kClAEN.js +0 -1771
- package/dist/bundle/index-C7wOh6y1.js +0 -657
- package/dist/bundle/index-CRaQAuki.js +0 -326
- package/dist/bundle/index-D9v1PCj9.js +0 -507
- package/dist/bundle/index-GDOuv_D5.js +0 -266
- package/dist/bundle/index-Gt44EOIH.js +0 -628
- package/dist/bundle/inflate-GtwLkvSP.js +0 -1048
- package/dist/bundle/parquetRead-BnAGCa4_.js +0 -1663
- package/dist/bundle/unzip-Bac01w6X.js +0 -1492
- package/dist/src/config/scaleDefaults.d.ts +0 -8
- package/dist/src/config/scaleDefaults.d.ts.map +0 -1
- package/dist/src/config/scaleDefaults.js +0 -45
|
@@ -14,14 +14,16 @@ import LayerView from "../layerView.js";
|
|
|
14
14
|
import Padding from "../layout/padding.js";
|
|
15
15
|
import Point from "../layout/point.js";
|
|
16
16
|
import Rectangle from "../layout/rectangle.js";
|
|
17
|
-
import createTitle from "../title.js";
|
|
17
|
+
import createTitle, { resolveTitleSpec } from "../title.js";
|
|
18
18
|
import UnitView from "../unitView.js";
|
|
19
19
|
import { markViewAsNonAddressable } from "../viewSelectors.js";
|
|
20
20
|
import Scrollbar from "./scrollbar.js";
|
|
21
|
-
import SelectionRect from "./selectionRect.js";
|
|
21
|
+
import SelectionRect, { INTERVAL_DRAG_ACTIVE_PARAM } from "./selectionRect.js";
|
|
22
22
|
import { normalizeIntervalForSelection } from "../../scales/selectionDomainUtils.js";
|
|
23
23
|
import { zoomDomainByScaleType } from "../../scales/zoomDomainUtils.js";
|
|
24
24
|
import { createEventFilterFunction } from "../../utils/expression.js";
|
|
25
|
+
import { getConfiguredViewBackground } from "../../config/viewConfig.js";
|
|
26
|
+
import { getConfiguredAxisDefaults } from "../../config/axisConfig.js";
|
|
25
27
|
|
|
26
28
|
export default class GridChild {
|
|
27
29
|
/**
|
|
@@ -63,12 +65,26 @@ export default class GridChild {
|
|
|
63
65
|
/** @type {UnitView} */
|
|
64
66
|
this.title = undefined;
|
|
65
67
|
|
|
68
|
+
/** @type {number} */
|
|
69
|
+
this.backgroundZindex = 0;
|
|
70
|
+
|
|
71
|
+
/** @type {number | undefined} */
|
|
72
|
+
this.backgroundStrokeZindex = undefined;
|
|
73
|
+
|
|
74
|
+
/** @type {number} */
|
|
75
|
+
this.titleZindex = 1;
|
|
76
|
+
|
|
66
77
|
/** @type {Rectangle} */
|
|
67
78
|
this.coords = Rectangle.ZERO;
|
|
68
79
|
|
|
69
80
|
if (view.needsAxes.x || view.needsAxes.y) {
|
|
70
81
|
const spec = view.spec;
|
|
71
|
-
const viewBackground =
|
|
82
|
+
const viewBackground = getConfiguredViewBackground(
|
|
83
|
+
view.getConfigScopes(),
|
|
84
|
+
"view" in spec ? spec.view : undefined
|
|
85
|
+
);
|
|
86
|
+
this.backgroundZindex = viewBackground?.zindex ?? 0;
|
|
87
|
+
this.backgroundStrokeZindex = viewBackground?.strokeZindex;
|
|
72
88
|
|
|
73
89
|
const backgroundSpec = createBackground(viewBackground);
|
|
74
90
|
if (backgroundSpec) {
|
|
@@ -104,7 +120,12 @@ export default class GridChild {
|
|
|
104
120
|
});
|
|
105
121
|
}
|
|
106
122
|
|
|
107
|
-
const
|
|
123
|
+
const titleSpec = resolveTitleSpec(
|
|
124
|
+
view.spec.title,
|
|
125
|
+
view.getConfigScopes()
|
|
126
|
+
);
|
|
127
|
+
this.titleZindex = titleSpec?.zindex ?? 1;
|
|
128
|
+
const title = createTitle(titleSpec);
|
|
108
129
|
if (title) {
|
|
109
130
|
const unitView = new UnitView(
|
|
110
131
|
title,
|
|
@@ -136,11 +157,6 @@ export default class GridChild {
|
|
|
136
157
|
#setupIntervalSelection() {
|
|
137
158
|
const view = this.view;
|
|
138
159
|
|
|
139
|
-
// TODO: Move to context
|
|
140
|
-
const setCursor = (/** @type {string} */ cursor) => {
|
|
141
|
-
this.view.context.glHelper.canvas.style.cursor = cursor;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
160
|
// TODO: If the child is a LayerView, selection params should be pulled from its children as well
|
|
145
161
|
for (const [name, param] of view.paramRuntime.paramConfigs) {
|
|
146
162
|
if (!("select" in param)) {
|
|
@@ -158,11 +174,11 @@ export default class GridChild {
|
|
|
158
174
|
const scaleResolutions = Object.fromEntries(
|
|
159
175
|
channels.map((channel) => {
|
|
160
176
|
const resolution = this.view.getScaleResolution(channel);
|
|
161
|
-
const
|
|
177
|
+
const scaleType = resolution?.getResolvedScaleType();
|
|
162
178
|
|
|
163
|
-
if (!
|
|
179
|
+
if (!resolution || !scaleType || !isContinuous(scaleType)) {
|
|
164
180
|
throw new Error(
|
|
165
|
-
`No continuous scale found for interval selection param "${name}" on channel "${channel}"! Scale type is "${
|
|
181
|
+
`No continuous scale found for interval selection param "${name}" on channel "${channel}"! Scale type is "${scaleType ?? "none"}".`
|
|
166
182
|
);
|
|
167
183
|
}
|
|
168
184
|
return [channel, resolution];
|
|
@@ -254,7 +270,6 @@ export default class GridChild {
|
|
|
254
270
|
|
|
255
271
|
const clearSelection = () => {
|
|
256
272
|
setter(createIntervalSelection(channels));
|
|
257
|
-
setCursor(null);
|
|
258
273
|
};
|
|
259
274
|
|
|
260
275
|
this.selectionRect = new SelectionRect(
|
|
@@ -262,6 +277,12 @@ export default class GridChild {
|
|
|
262
277
|
selectionExpr,
|
|
263
278
|
select.mark
|
|
264
279
|
);
|
|
280
|
+
const setIntervalDragActive = (/** @type {boolean} */ active) => {
|
|
281
|
+
this.selectionRect.paramRuntime.setValue(
|
|
282
|
+
INTERVAL_DRAG_ACTIVE_PARAM,
|
|
283
|
+
active
|
|
284
|
+
);
|
|
285
|
+
};
|
|
265
286
|
|
|
266
287
|
// WARNING! The following is an async method! Seems to work (by chance).
|
|
267
288
|
// TODO: Should be called and awaited in a sensible place. Maybe provide some
|
|
@@ -318,7 +339,7 @@ export default class GridChild {
|
|
|
318
339
|
return Rectangle.create(a.x, a.y, b.x - a.x, b.y - a.y);
|
|
319
340
|
};
|
|
320
341
|
|
|
321
|
-
view.
|
|
342
|
+
view.addInteractionListener("mousedown", (event) => {
|
|
322
343
|
if (event.mouseEvent.button != 0) {
|
|
323
344
|
return;
|
|
324
345
|
}
|
|
@@ -332,7 +353,7 @@ export default class GridChild {
|
|
|
332
353
|
|
|
333
354
|
if (translatedRectangle) {
|
|
334
355
|
// Started dragging an existing selection
|
|
335
|
-
|
|
356
|
+
setIntervalDragActive(true);
|
|
336
357
|
// Start of dragging should prevent click propagation so that
|
|
337
358
|
// no other selections or events are triggered.
|
|
338
359
|
preventNextClickPropagation = true;
|
|
@@ -355,12 +376,9 @@ export default class GridChild {
|
|
|
355
376
|
} else if (isActiveIntervalSelection(selectionExpr())) {
|
|
356
377
|
// If mouse button is released and there was a selection,
|
|
357
378
|
// it should be cleared unless the viewport was panned by dragging.
|
|
358
|
-
/** @type {import("../view.js").
|
|
359
|
-
const listener = (
|
|
360
|
-
view.
|
|
361
|
-
"mouseup",
|
|
362
|
-
listener
|
|
363
|
-
);
|
|
379
|
+
/** @type {import("../view.js").InteractionListener} */
|
|
380
|
+
const listener = (event) => {
|
|
381
|
+
view.removeInteractionListener("mouseup", listener);
|
|
364
382
|
const mouseUpPoint = event.point;
|
|
365
383
|
|
|
366
384
|
// Retain selection if the viewport is panned by dragging
|
|
@@ -372,7 +390,7 @@ export default class GridChild {
|
|
|
372
390
|
clearSelection();
|
|
373
391
|
}
|
|
374
392
|
};
|
|
375
|
-
view.
|
|
393
|
+
view.addInteractionListener("mouseup", listener);
|
|
376
394
|
return;
|
|
377
395
|
} else {
|
|
378
396
|
return;
|
|
@@ -381,6 +399,7 @@ export default class GridChild {
|
|
|
381
399
|
|
|
382
400
|
// Prevent panning interaction
|
|
383
401
|
event.stopPropagation();
|
|
402
|
+
view.context.suspendHoverTracking();
|
|
384
403
|
|
|
385
404
|
const start = event.point;
|
|
386
405
|
const viewOffset = Point.fromMouseEvent(
|
|
@@ -454,27 +473,28 @@ export default class GridChild {
|
|
|
454
473
|
setter({ type: "interval", intervals });
|
|
455
474
|
};
|
|
456
475
|
|
|
457
|
-
const mouseUpListener = () => {
|
|
476
|
+
const mouseUpListener = (/** @type {MouseEvent} */ upEvent) => {
|
|
458
477
|
document.removeEventListener(
|
|
459
478
|
"mousemove",
|
|
460
479
|
mouseMoveListener
|
|
461
480
|
);
|
|
462
481
|
document.removeEventListener("mouseup", mouseUpListener);
|
|
463
482
|
|
|
483
|
+
setIntervalDragActive(false);
|
|
464
484
|
nowBrushing = false;
|
|
465
485
|
if (translatedRectangle) {
|
|
466
|
-
setCursor("move");
|
|
467
486
|
translatedRectangle = null;
|
|
468
487
|
}
|
|
488
|
+
view.context.resumeHoverTracking(upEvent);
|
|
469
489
|
};
|
|
470
490
|
document.addEventListener("mousemove", mouseMoveListener);
|
|
471
491
|
|
|
472
492
|
document.addEventListener("mouseup", mouseUpListener);
|
|
473
493
|
});
|
|
474
494
|
|
|
475
|
-
view.
|
|
495
|
+
view.addInteractionListener(
|
|
476
496
|
"click",
|
|
477
|
-
(
|
|
497
|
+
(event) => {
|
|
478
498
|
if (event.mouseEvent.button == 0) {
|
|
479
499
|
if (preventNextClickPropagation) {
|
|
480
500
|
event.stopPropagation();
|
|
@@ -489,9 +509,9 @@ export default class GridChild {
|
|
|
489
509
|
selectionContainsPoint(selectionExpr(), invertPoint(point));
|
|
490
510
|
|
|
491
511
|
// TODO: Make behavior configurable
|
|
492
|
-
view.
|
|
512
|
+
view.addInteractionListener(
|
|
493
513
|
"dblclick",
|
|
494
|
-
(
|
|
514
|
+
(event) => {
|
|
495
515
|
if (isPointInsideSelection(event.point)) {
|
|
496
516
|
clearSelection();
|
|
497
517
|
event.stopPropagation();
|
|
@@ -500,11 +520,8 @@ export default class GridChild {
|
|
|
500
520
|
true
|
|
501
521
|
);
|
|
502
522
|
|
|
503
|
-
view.
|
|
504
|
-
const wheelEvent = event.
|
|
505
|
-
if (!(wheelEvent instanceof WheelEvent)) {
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
523
|
+
view.addInteractionListener("wheel", (event) => {
|
|
524
|
+
const wheelEvent = event.wheelEvent;
|
|
508
525
|
|
|
509
526
|
if (
|
|
510
527
|
!zoomEventConfig ||
|
|
@@ -581,21 +598,14 @@ export default class GridChild {
|
|
|
581
598
|
});
|
|
582
599
|
|
|
583
600
|
// Handle mouse cursor changes
|
|
584
|
-
view.
|
|
601
|
+
view.addInteractionListener("mousemove", (event) => {
|
|
585
602
|
if (isPointInsideSelection(event.point)) {
|
|
586
603
|
// Brushing and translating the existing brush are different actions.
|
|
587
604
|
if (!nowBrushing) {
|
|
588
605
|
mouseOver = true;
|
|
589
|
-
// When translation is active, the cursor shows a grabbing hand.
|
|
590
|
-
if (!translatedRectangle) {
|
|
591
|
-
setCursor("move");
|
|
592
|
-
}
|
|
593
606
|
}
|
|
594
607
|
} else {
|
|
595
608
|
mouseOver = false;
|
|
596
|
-
if (!translatedRectangle) {
|
|
597
|
-
setCursor(null);
|
|
598
|
-
}
|
|
599
609
|
}
|
|
600
610
|
});
|
|
601
611
|
}
|
|
@@ -703,10 +713,29 @@ export default class GridChild {
|
|
|
703
713
|
*/
|
|
704
714
|
const createAxisGrid = async (r, channel, axisParent) => {
|
|
705
715
|
const props = getAxisPropsWithDefaults(r, channel);
|
|
716
|
+
if (!props) {
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
706
719
|
|
|
707
|
-
|
|
720
|
+
const defaults = getConfiguredAxisDefaults(
|
|
721
|
+
axisParent.getConfigScopes(),
|
|
722
|
+
{
|
|
723
|
+
channel,
|
|
724
|
+
orient: props.orient,
|
|
725
|
+
type: /** @type {import("../../spec/channel.js").Type} */ (
|
|
726
|
+
r.scaleResolution.type
|
|
727
|
+
),
|
|
728
|
+
style: props.style,
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
const effectiveProps = {
|
|
732
|
+
...defaults,
|
|
733
|
+
...props,
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
if (effectiveProps.grid || effectiveProps.chromGrid) {
|
|
708
737
|
const axisGridView = new AxisGridView(
|
|
709
|
-
|
|
738
|
+
effectiveProps,
|
|
710
739
|
r.scaleResolution.type,
|
|
711
740
|
this.layoutParent.context,
|
|
712
741
|
this.layoutParent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridView.d.ts","sourceRoot":"","sources":["../../../../src/view/gridView/gridView.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gridView.d.ts","sourceRoot":"","sources":["../../../../src/view/gridView/gridView.js"],"names":[],"mappings":"AAmmCA;;GAEG;AACH,sHAUC;AA4DD;;;;;GAKG;AACH,4CAJW,OAAO,wBAAwB,EAAE,OAAO,UACxC,OAAO,oBAAoB,EAAE,UAAU,YACvC,QAAQ,aAmBlB;AAtpCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAH2D,KAAK,SAAnD,OAAQ,oBAAoB,EAAE,aAAc;IA6CrD;;;;;;;;;OASG;IACH,kBARW,KAAK,WACL,OAAO,4BAA4B,EAAE,OAAO,gBAC5C,aAAa,yFAEb,MAAM,WACN,MAAM,YACN,OAAO,YAAY,EAAE,WAAW,EAyC1C;IAtBG,uBAA0B;IAwB9B;;OAEG;IACH,6FAEC;IAED;;;;;;OAMG;IACH,4FAFa,SAAS,CAIrB;IAED;;;;;;;OAOG;IACH,oGAHW,MAAM,GACJ,SAAS,CASrB;IAED;;;;;OAKG;IACH,iGAQC;IAED;;;;;OAKG;IACH,qBAFW,MAAM,QAUhB;IAeD;;OAEG;IACH,mBAFW,qEAAM,QAWhB;IAYD;;OAEG;IACH,sFAEC;IAED,yBAEC;IAED;;OAEG;IACH,sCAKC;IAED;;;;OAIG;IACH,gCAqCC;;CA6xBJ;qBAtlC0D,gBAAgB;sBADrD,wBAAwB;0BAEpB,qBAAqB;sBAQzB,gBAAgB"}
|