higlass 1.13.5 → 2.0.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/README.md +48 -54
- package/app/globals.d.ts +1 -1
- package/app/missing-types.d.ts +4 -1
- package/app/scripts/AddTrackDialog.jsx +11 -4
- package/app/scripts/AddTrackPositionMenu.jsx +28 -7
- package/app/scripts/Annotations1dTrack.js +90 -251
- package/app/scripts/Annotations2dTrack.js +12 -7
- package/app/scripts/Autocomplete.jsx +13 -28
- package/app/scripts/AxisPixi.js +6 -10
- package/app/scripts/BarTrack.js +3 -3
- package/app/scripts/BedLikeTrack.js +556 -449
- package/app/scripts/Button.jsx +1 -1
- package/app/scripts/CNVIntervalTrack.js +1 -1
- package/app/scripts/CenterTrack.jsx +8 -7
- package/app/scripts/Chromosome2DAnnotations.js +1 -1
- package/app/scripts/Chromosome2DLabels.js +1 -1
- package/app/scripts/ChromosomeGrid.js +49 -38
- package/app/scripts/ChromosomeInfo.js +1 -1
- package/app/scripts/CombinedTrack.js +3 -1
- package/app/scripts/ConfigTrackMenu.jsx +1 -1
- package/app/scripts/ConfigViewMenu.jsx +2 -2
- package/app/scripts/ContextMenuContainer.jsx +4 -2
- package/app/scripts/ContextMenuItem.jsx +14 -2
- package/app/scripts/CrossRule.js +1 -1
- package/app/scripts/CustomTrackDialog.jsx +2 -2
- package/app/scripts/Dialog.jsx +2 -2
- package/app/scripts/DragListeningDiv.jsx +1 -1
- package/app/scripts/DraggableDiv.jsx +2 -3
- package/app/scripts/ExportLinkDialog.jsx +1 -1
- package/app/scripts/FilledLine.js +349 -0
- package/app/scripts/GalleryTracks.jsx +77 -78
- package/app/scripts/GenomePositionSearchBox.jsx +184 -482
- package/app/scripts/HeatmapOptions.jsx +4 -2
- package/app/scripts/HeatmapTiledPixiTrack.js +23 -32
- package/app/scripts/HiGlassComponent.jsx +515 -444
- package/app/scripts/HiGlassComponentContext.js +5 -0
- package/app/scripts/Horizontal1dHeatmapTrack.js +1 -1
- package/app/scripts/Horizontal2DDomainsTrack.js +1 -1
- package/app/scripts/HorizontalChromosomeLabels.js +28 -22
- package/app/scripts/HorizontalGeneAnnotationsTrack.js +1 -1
- package/app/scripts/HorizontalHeatmapTrack.js +2 -2
- package/app/scripts/HorizontalMultivecTrack.js +6 -7
- package/app/scripts/HorizontalRule.js +1 -2
- package/app/scripts/HorizontalTiled1DPixiTrack.js +4 -4
- package/app/scripts/HorizontalTiledPlot.jsx +9 -9
- package/app/scripts/LeftTrackModifier.js +4 -0
- package/app/scripts/ListWrapper.jsx +1 -2
- package/app/scripts/MapboxTilesTrack.js +1 -2
- package/app/scripts/Modal.jsx +2 -2
- package/app/scripts/MoveableTrack.jsx +10 -12
- package/app/scripts/NestedContextMenu.jsx +2 -1
- package/app/scripts/OSMTileIdsTrack.js +1 -1
- package/app/scripts/OverlayTrack.js +4 -4
- package/app/scripts/PixiTrack.js +27 -13
- package/app/scripts/PlotTypeChooser.jsx +3 -4
- package/app/scripts/SearchField.js +5 -5
- package/app/scripts/SeriesListItems.jsx +3 -4
- package/app/scripts/SeriesListMenu.jsx +95 -53
- package/app/scripts/SeriesListSubmenuMixin.jsx +2 -1
- package/app/scripts/SketchInlinePicker.jsx +2 -2
- package/app/scripts/SortableList.jsx +1 -1
- package/app/scripts/Tiled1DPixiTrack.js +4 -1
- package/app/scripts/TiledPixiTrack.js +244 -102
- package/app/scripts/TiledPlot.jsx +565 -118
- package/app/scripts/TilesetFinder.jsx +12 -4
- package/app/scripts/Track.js +1 -1
- package/app/scripts/TrackArea.jsx +4 -0
- package/app/scripts/TrackControl.jsx +2 -2
- package/app/scripts/TrackRenderer.jsx +32 -33
- package/app/scripts/ValueIntervalTrack.js +1 -1
- package/app/scripts/VerticalRule.js +2 -2
- package/app/scripts/VerticalTiledPlot.jsx +7 -7
- package/app/scripts/ViewConfigEditor.jsx +1 -1
- package/app/scripts/ViewContextMenu.jsx +53 -5
- package/app/scripts/ViewHeader.jsx +9 -9
- package/app/scripts/ViewportTracker2D.js +1 -1
- package/app/scripts/api.js +92 -12
- package/app/scripts/configs/available-track-types.js +1 -1
- package/app/scripts/configs/index.js +6 -1
- package/app/scripts/configs/positions-by-datatype.js +2 -2
- package/app/scripts/configs/primitives.js +2 -0
- package/app/scripts/configs/themes.js +0 -1
- package/app/scripts/configs/tracks-info-by-type.js +11 -8
- package/app/scripts/configs/tracks-info.js +3 -2
- package/app/scripts/d3-context-menu.js +3 -4
- package/app/scripts/data-fetchers/DataFetcher.js +35 -36
- package/app/scripts/data-fetchers/genbank-fetcher.js +13 -22
- package/app/scripts/data-fetchers/local-tile-fetcher.js +10 -8
- package/app/scripts/hglib.jsx +62 -71
- package/app/scripts/hocs/with-modal.jsx +32 -10
- package/app/scripts/hocs/with-pub-sub.js +12 -3
- package/app/scripts/hocs/with-theme.jsx +21 -14
- package/app/scripts/icons.jsx +3 -2
- package/app/scripts/mixwith.js +2 -2
- package/app/scripts/options-info.js +49 -11
- package/app/scripts/plugins/get-data-fetcher.js +2 -3
- package/app/scripts/services/chrom-info.js +32 -4
- package/app/scripts/services/element-resize-listener.js +2 -2
- package/app/scripts/services/index.js +0 -1
- package/app/scripts/services/tile-proxy.js +368 -285
- package/app/scripts/services/worker.js +31 -28
- package/app/scripts/test-helpers/index.js +2 -1
- package/app/scripts/test-helpers/test-helpers.jsx +157 -69
- package/app/scripts/types.ts +118 -47
- package/app/scripts/utils/LruCache.js +3 -2
- package/app/scripts/utils/assert.js +19 -0
- package/app/scripts/utils/background-task-scheduler.js +2 -0
- package/app/scripts/utils/color-domain-to-rgba-array.js +13 -3
- package/app/scripts/utils/copy-text-to-clipboard.js +36 -0
- package/app/scripts/utils/decompress.js +33 -0
- package/app/scripts/utils/default-tracks.js +46 -0
- package/app/scripts/utils/dict-items.js +1 -0
- package/app/scripts/utils/dict-keys.js +1 -0
- package/app/scripts/utils/dict-values.js +1 -0
- package/app/scripts/utils/expand-combined-tracks.js +11 -7
- package/app/scripts/utils/fill-in-min-widths.js +47 -21
- package/app/scripts/utils/flatten.js +0 -1
- package/app/scripts/utils/get-aggregation-function.js +1 -1
- package/app/scripts/utils/get-default-track-for-datatype.js +37 -10
- package/app/scripts/utils/get-default-tracks-for-datatype.ts +46 -0
- package/app/scripts/utils/get-higlass-components.js +27 -3
- package/app/scripts/utils/get-track-position-by-uid.js +8 -1
- package/app/scripts/utils/get-xylofon.js +12 -9
- package/app/scripts/utils/has-parent.js +5 -5
- package/app/scripts/utils/hex-string-to-int.js +1 -1
- package/app/scripts/utils/index.js +1 -0
- package/app/scripts/utils/interval-tree.js +222 -177
- package/app/scripts/utils/load-chrom-infos.js +4 -1
- package/app/scripts/utils/pixi-text-to-svg.js +5 -9
- package/app/scripts/utils/positioned-tracks-to-all-tracks.js +55 -0
- package/app/scripts/utils/range-query-2d.js +3 -3
- package/app/scripts/utils/reduce.js +12 -5
- package/app/scripts/utils/segments-to-rows.js +14 -11
- package/app/scripts/utils/svg-line.js +7 -8
- package/app/scripts/utils/type-guards.js +16 -7
- package/app/scripts/utils/visit-positioned-tracks.js +9 -4
- package/app/styles/AddTrackPositionMenu.module.scss +37 -0
- package/app/styles/HiGlass.module.scss +3 -1
- package/app/styles/d3-context-menu.css +0 -1
- package/app/styles/prism.css +1 -0
- package/dist/app/schema.json +525 -0
- package/dist/app/scripts/AddTrackDialog.d.ts +64 -0
- package/dist/app/scripts/AddTrackPositionMenu.d.ts +5 -0
- package/dist/app/scripts/Annotations1dTrack.d.ts +15 -0
- package/dist/app/scripts/Annotations2dTrack.d.ts +95 -0
- package/dist/app/scripts/ArrowheadDomainsTrack.d.ts +36 -0
- package/dist/app/scripts/Autocomplete.d.ts +102 -0
- package/dist/app/scripts/AxisPixi.d.ts +25 -0
- package/dist/app/scripts/BarTrack.d.ts +28 -0
- package/dist/app/scripts/BedLikeTrack.d.ts +84 -0
- package/dist/app/scripts/Button.d.ts +3 -0
- package/dist/app/scripts/CNVIntervalTrack.d.ts +12 -0
- package/dist/app/scripts/CenterTiledPlot.d.ts +3 -0
- package/dist/app/scripts/CenterTrack.d.ts +92 -0
- package/dist/app/scripts/Chromosome2DAnnotations.d.ts +10 -0
- package/dist/app/scripts/Chromosome2DLabels.d.ts +13 -0
- package/dist/app/scripts/ChromosomeGrid.d.ts +24 -0
- package/dist/app/scripts/ChromosomeInfo.d.ts +14 -0
- package/dist/app/scripts/CloseTrackMenu.d.ts +10 -0
- package/dist/app/scripts/CombinedTrack.d.ts +32 -0
- package/dist/app/scripts/ConfigTrackMenu.d.ts +10 -0
- package/dist/app/scripts/ConfigViewMenu.d.ts +34 -0
- package/dist/app/scripts/ConfigureSeriesMenu.d.ts +3 -0
- package/dist/app/scripts/ContextMenuContainer.d.ts +36 -0
- package/dist/app/scripts/ContextMenuItem.d.ts +34 -0
- package/dist/app/scripts/Cross.d.ts +3 -0
- package/dist/app/scripts/CrossRule.d.ts +24 -0
- package/dist/app/scripts/CustomTrackDialog.d.ts +17 -0
- package/dist/app/scripts/Dialog.d.ts +5 -0
- package/dist/app/scripts/DivergentBarTrack.d.ts +4 -0
- package/dist/app/scripts/DragListeningDiv.d.ts +32 -0
- package/dist/app/scripts/DraggableDiv.d.ts +63 -0
- package/dist/app/scripts/ExportLinkDialog.d.ts +21 -0
- package/dist/app/scripts/FilledLine.d.ts +5 -0
- package/dist/app/scripts/FixedTrack.d.ts +5 -0
- package/dist/app/scripts/GalleryTracks.d.ts +20 -0
- package/dist/app/scripts/GenomePositionSearchBox.d.ts +95 -0
- package/dist/app/scripts/HeatmapOptions.d.ts +30 -0
- package/dist/app/scripts/HeatmapTiledPixiTrack.d.ts +184 -0
- package/dist/app/scripts/HiGlassComponent.d.ts +762 -0
- package/dist/app/scripts/HiGlassComponentContext.d.ts +3 -0
- package/dist/app/scripts/HiGlassTrackComponent.d.ts +37 -0
- package/dist/app/scripts/Horizontal1dHeatmapTrack.d.ts +9 -0
- package/dist/app/scripts/Horizontal2DDomainsTrack.d.ts +21 -0
- package/dist/app/scripts/HorizontalChromosomeLabels.d.ts +47 -0
- package/dist/app/scripts/HorizontalGeneAnnotationsTrack.d.ts +25 -0
- package/dist/app/scripts/HorizontalHeatmapTrack.d.ts +12 -0
- package/dist/app/scripts/HorizontalItem.d.ts +3 -0
- package/dist/app/scripts/HorizontalLine1DPixiTrack.d.ts +23 -0
- package/dist/app/scripts/HorizontalMultivecTrack.d.ts +50 -0
- package/dist/app/scripts/HorizontalPoint1DPixiTrack.d.ts +5 -0
- package/dist/app/scripts/HorizontalRule.d.ts +22 -0
- package/dist/app/scripts/HorizontalTiled1DPixiTrack.d.ts +26 -0
- package/dist/app/scripts/HorizontalTiledPlot.d.ts +49 -0
- package/dist/app/scripts/HorizontalTrack.d.ts +6 -0
- package/dist/app/scripts/Id2DTiledPixiTrack.d.ts +10 -0
- package/dist/app/scripts/IdHorizontal1DTiledPixiTrack.d.ts +6 -0
- package/dist/app/scripts/IdVertical1DTiledPixiTrack.d.ts +7 -0
- package/dist/app/scripts/LeftAxisTrack.d.ts +9 -0
- package/dist/app/scripts/LeftTrackModifier.d.ts +29 -0
- package/dist/app/scripts/ListWrapper.d.ts +64 -0
- package/dist/app/scripts/MapboxTilesTrack.d.ts +9 -0
- package/dist/app/scripts/Modal.d.ts +5 -0
- package/dist/app/scripts/MoveableTrack.d.ts +18 -0
- package/dist/app/scripts/NestedContextMenu.d.ts +7 -0
- package/dist/app/scripts/OSMTileIdsTrack.d.ts +5 -0
- package/dist/app/scripts/OSMTilesTrack.d.ts +129 -0
- package/dist/app/scripts/OverlayTrack.d.ts +13 -0
- package/dist/app/scripts/PixiTrack.d.ts +174 -0
- package/dist/app/scripts/PlotTypeChooser.d.ts +25 -0
- package/dist/app/scripts/PopupMenu.d.ts +28 -0
- package/dist/app/scripts/RasterTilesTrack.d.ts +9 -0
- package/dist/app/scripts/RuleMixin.d.ts +2 -0
- package/dist/app/scripts/SVGTrack.d.ts +15 -0
- package/dist/app/scripts/SearchField.d.ts +13 -0
- package/dist/app/scripts/SeriesListItems.d.ts +2 -0
- package/dist/app/scripts/SeriesListMenu.d.ts +51 -0
- package/dist/app/scripts/SeriesListSubmenuMixin.d.ts +2 -0
- package/dist/app/scripts/SketchInlinePicker.d.ts +25 -0
- package/dist/app/scripts/SortableList.d.ts +22 -0
- package/dist/app/scripts/SquareMarkersTrack.d.ts +22 -0
- package/dist/app/scripts/Tiled1DPixiTrack.d.ts +60 -0
- package/dist/app/scripts/TiledPixiTrack.d.ts +369 -0
- package/dist/app/scripts/TiledPlot.d.ts +313 -0
- package/dist/app/scripts/TilesetFinder.d.ts +65 -0
- package/dist/app/scripts/TopAxisTrack.d.ts +9 -0
- package/dist/app/scripts/Track.d.ts +196 -0
- package/dist/app/scripts/TrackArea.d.ts +26 -0
- package/dist/app/scripts/TrackControl.d.ts +5 -0
- package/dist/app/scripts/TrackRenderer.d.ts +724 -0
- package/dist/app/scripts/UnknownPixiTrack.d.ts +7 -0
- package/dist/app/scripts/ValueIntervalTrack.d.ts +6 -0
- package/dist/app/scripts/VerticalItem.d.ts +3 -0
- package/dist/app/scripts/VerticalRule.d.ts +21 -0
- package/dist/app/scripts/VerticalTiled1DPixiTrack.d.ts +6 -0
- package/dist/app/scripts/VerticalTiledPlot.d.ts +50 -0
- package/dist/app/scripts/VerticalTrack.d.ts +6 -0
- package/dist/app/scripts/ViewConfigEditor.d.ts +53 -0
- package/dist/app/scripts/ViewContextMenu.d.ts +17 -0
- package/dist/app/scripts/ViewHeader.d.ts +75 -0
- package/dist/app/scripts/ViewportTracker2D.d.ts +17 -0
- package/dist/app/scripts/ViewportTracker2DPixi.d.ts +11 -0
- package/dist/app/scripts/ViewportTrackerHorizontal.d.ts +17 -0
- package/dist/app/scripts/ViewportTrackerVertical.d.ts +17 -0
- package/dist/app/scripts/api.d.ts +640 -0
- package/dist/app/scripts/configs/available-track-types.d.ts +2 -0
- package/dist/app/scripts/configs/colormaps.d.ts +2 -0
- package/dist/app/scripts/configs/datatype-to-track-type.d.ts +4 -0
- package/dist/app/scripts/configs/default-tracks-for-datatype.d.ts +38 -0
- package/dist/app/scripts/configs/dense-data-extrema-config.d.ts +2 -0
- package/dist/app/scripts/configs/globals.d.ts +5 -0
- package/dist/app/scripts/configs/index.d.ts +16 -0
- package/dist/app/scripts/configs/positions-by-datatype.d.ts +2 -0
- package/dist/app/scripts/configs/primitives.d.ts +20 -0
- package/dist/app/scripts/configs/themes.d.ts +3 -0
- package/dist/app/scripts/configs/tracks-info-by-type.d.ts +4 -0
- package/dist/app/scripts/configs/tracks-info.d.ts +24 -0
- package/dist/app/scripts/d3-context-menu.d.ts +2 -0
- package/dist/app/scripts/data-fetchers/DataFetcher.d.ts +151 -0
- package/dist/app/scripts/data-fetchers/genbank-fetcher.d.ts +86 -0
- package/dist/app/scripts/data-fetchers/index.d.ts +3 -0
- package/dist/app/scripts/data-fetchers/local-tile-fetcher.d.ts +47 -0
- package/dist/app/scripts/gosling-exports.d.ts +17 -0
- package/dist/app/scripts/hglib.d.ts +24 -0
- package/dist/app/scripts/hocs/with-modal.d.ts +19 -0
- package/dist/app/scripts/hocs/with-pub-sub.d.ts +22 -0
- package/dist/app/scripts/hocs/with-theme.d.ts +13 -0
- package/dist/app/scripts/icons.d.ts +161 -0
- package/dist/app/scripts/mixwith.d.ts +27 -0
- package/dist/app/scripts/options-info.d.ts +1355 -0
- package/dist/app/scripts/plugins/available-for-plugins.d.ts +2338 -0
- package/dist/app/scripts/plugins/get-data-fetcher.d.ts +2 -0
- package/dist/app/scripts/plugins/index.d.ts +2 -0
- package/dist/app/scripts/services/chrom-info.d.ts +10 -0
- package/dist/app/scripts/services/dom-event.d.ts +7 -0
- package/dist/app/scripts/services/element-resize-listener.d.ts +5 -0
- package/dist/app/scripts/services/index.d.ts +5 -0
- package/dist/app/scripts/services/tile-proxy.d.ts +180 -0
- package/dist/app/scripts/services/worker.d.ts +157 -0
- package/dist/app/scripts/symbol.d.ts +13 -0
- package/dist/app/scripts/test-helpers/index.d.ts +1 -0
- package/dist/app/scripts/test-helpers/test-helpers.d.ts +33 -0
- package/dist/app/scripts/track-utils.d.ts +73 -0
- package/dist/app/scripts/types.d.ts +199 -0
- package/dist/app/scripts/utils/DenseDataExtrema1D.d.ts +88 -0
- package/dist/app/scripts/utils/DenseDataExtrema2D.d.ts +97 -0
- package/dist/app/scripts/utils/LruCache.d.ts +44 -0
- package/dist/app/scripts/utils/abs-to-chr.d.ts +14 -0
- package/dist/app/scripts/utils/accessor-transposition.d.ts +14 -0
- package/dist/app/scripts/utils/add-arrays.d.ts +18 -0
- package/dist/app/scripts/utils/add-class.d.ts +8 -0
- package/dist/app/scripts/utils/add-event-listener-once.d.ts +11 -0
- package/dist/app/scripts/utils/assert.d.ts +17 -0
- package/dist/app/scripts/utils/background-task-scheduler.d.ts +47 -0
- package/dist/app/scripts/utils/base64-to-canvas.d.ts +9 -0
- package/dist/app/scripts/utils/chr-to-abs.d.ts +10 -0
- package/dist/app/scripts/utils/chrom-info-bisector.d.ts +4 -0
- package/dist/app/scripts/utils/clone-event.d.ts +12 -0
- package/dist/app/scripts/utils/color-domain-to-rgba-array.d.ts +13 -0
- package/dist/app/scripts/utils/color-to-hex.d.ts +9 -0
- package/dist/app/scripts/utils/color-to-rgba.d.ts +9 -0
- package/dist/app/scripts/utils/copy-text-to-clipboard.d.ts +2 -0
- package/dist/app/scripts/utils/data-to-genomic-loci.d.ts +11 -0
- package/dist/app/scripts/utils/debounce.d.ts +5 -0
- package/dist/app/scripts/utils/dec-to-hex-str.d.ts +8 -0
- package/dist/app/scripts/utils/decompress.d.ts +27 -0
- package/dist/app/scripts/utils/default-tracks.d.ts +3 -0
- package/dist/app/scripts/utils/dict-from-tuples.d.ts +11 -0
- package/dist/app/scripts/utils/dict-items.d.ts +18 -0
- package/dist/app/scripts/utils/dict-keys.d.ts +10 -0
- package/dist/app/scripts/utils/dict-values.d.ts +8 -0
- package/dist/app/scripts/utils/download.d.ts +7 -0
- package/dist/app/scripts/utils/expand-combined-tracks.d.ts +11 -0
- package/dist/app/scripts/utils/fake-pub-sub.d.ts +11 -0
- package/dist/app/scripts/utils/fill-in-min-widths.d.ts +44 -0
- package/dist/app/scripts/utils/flatten.d.ts +9 -0
- package/dist/app/scripts/utils/for-each.d.ts +9 -0
- package/dist/app/scripts/utils/forward-event.d.ts +7 -0
- package/dist/app/scripts/utils/genome-loci-to-pixels.d.ts +9 -0
- package/dist/app/scripts/utils/genomic-range-to-chromosome-chunks.d.ts +21 -0
- package/dist/app/scripts/utils/get-aggregation-function.d.ts +10 -0
- package/dist/app/scripts/utils/get-default-track-for-datatype.d.ts +21 -0
- package/dist/app/scripts/utils/get-default-tracks-for-datatype.d.ts +3 -0
- package/dist/app/scripts/utils/get-element-dim.d.ts +7 -0
- package/dist/app/scripts/utils/get-higlass-components.d.ts +7 -0
- package/dist/app/scripts/utils/get-track-by-uid.d.ts +7 -0
- package/dist/app/scripts/utils/get-track-conf-from-hgc.d.ts +10 -0
- package/dist/app/scripts/utils/get-track-obj-by-id.d.ts +2 -0
- package/dist/app/scripts/utils/get-track-position-by-uid.d.ts +13 -0
- package/dist/app/scripts/utils/get-xylofon.d.ts +2 -0
- package/dist/app/scripts/utils/gradient.d.ts +14 -0
- package/dist/app/scripts/utils/has-class.d.ts +8 -0
- package/dist/app/scripts/utils/has-parent.d.ts +9 -0
- package/dist/app/scripts/utils/hex-string-to-int.d.ts +14 -0
- package/dist/app/scripts/utils/index.d.ts +89 -0
- package/dist/app/scripts/utils/interval-tree.d.ts +109 -0
- package/dist/app/scripts/utils/into-the-void.d.ts +6 -0
- package/dist/app/scripts/utils/is-track-or-child-track.d.ts +7 -0
- package/dist/app/scripts/utils/is-track-range-selectable.d.ts +2 -0
- package/dist/app/scripts/utils/is-within.d.ts +12 -0
- package/dist/app/scripts/utils/lat-to-y.d.ts +9 -0
- package/dist/app/scripts/utils/lng-to-x.d.ts +8 -0
- package/dist/app/scripts/utils/load-chrom-infos.d.ts +8 -0
- package/dist/app/scripts/utils/map.d.ts +13 -0
- package/dist/app/scripts/utils/max-non-zero.d.ts +6 -0
- package/dist/app/scripts/utils/max.d.ts +10 -0
- package/dist/app/scripts/utils/min-non-zero.d.ts +6 -0
- package/dist/app/scripts/utils/min.d.ts +10 -0
- package/dist/app/scripts/utils/mod.d.ts +9 -0
- package/dist/app/scripts/utils/ndarray-assign.d.ts +2 -0
- package/dist/app/scripts/utils/ndarray-flatten.d.ts +2 -0
- package/dist/app/scripts/utils/ndarray-to-list.d.ts +2 -0
- package/dist/app/scripts/utils/numericify-version.d.ts +6 -0
- package/dist/app/scripts/utils/obj-vals.d.ts +8 -0
- package/dist/app/scripts/utils/or.d.ts +8 -0
- package/dist/app/scripts/utils/parse-chromsizes-rows.d.ts +34 -0
- package/dist/app/scripts/utils/pixi-text-to-svg.d.ts +2 -0
- package/dist/app/scripts/utils/positioned-tracks-to-all-tracks.d.ts +26 -0
- package/dist/app/scripts/utils/q.d.ts +18 -0
- package/dist/app/scripts/utils/rad-to-deg.d.ts +7 -0
- package/dist/app/scripts/utils/range-query-2d.d.ts +17 -0
- package/dist/app/scripts/utils/reduce.d.ts +14 -0
- package/dist/app/scripts/utils/rel-to-abs-chrom-pos.d.ts +10 -0
- package/dist/app/scripts/utils/remove-class.d.ts +7 -0
- package/dist/app/scripts/utils/reset-d3-brush-style.d.ts +10 -0
- package/dist/app/scripts/utils/rgb-to-hex.d.ts +8 -0
- package/dist/app/scripts/utils/scales-center-and-k.d.ts +12 -0
- package/dist/app/scripts/utils/scales-to-genome-loci.d.ts +3 -0
- package/dist/app/scripts/utils/segments-to-rows.d.ts +15 -0
- package/dist/app/scripts/utils/selected-items-to-cum-weights.d.ts +12 -0
- package/dist/app/scripts/utils/selected-items-to-size.d.ts +13 -0
- package/dist/app/scripts/utils/show-mouse-position.d.ts +54 -0
- package/dist/app/scripts/utils/some.d.ts +10 -0
- package/dist/app/scripts/utils/sum.d.ts +8 -0
- package/dist/app/scripts/utils/svg-line.d.ts +2 -0
- package/dist/app/scripts/utils/throttle-and-debounce.d.ts +33 -0
- package/dist/app/scripts/utils/tile-to-canvas.d.ts +9 -0
- package/dist/app/scripts/utils/timeout.d.ts +3 -0
- package/dist/app/scripts/utils/to-void.d.ts +3 -0
- package/dist/app/scripts/utils/total-track-pixel-height.d.ts +27 -0
- package/dist/app/scripts/utils/trim-trailing-slash.d.ts +7 -0
- package/dist/app/scripts/utils/type-guards.d.ts +36 -0
- package/dist/app/scripts/utils/value-to-color.d.ts +12 -0
- package/dist/app/scripts/utils/visit-positioned-tracks.d.ts +18 -0
- package/dist/app/scripts/utils/visit-tracks.d.ts +9 -0
- package/dist/esm.html +1 -3
- package/dist/hglib.js +86315 -100592
- package/dist/hglib.min.js +123 -131
- package/dist/higlass.mjs +88861 -103138
- package/dist/index.html +1 -3
- package/dist/package.json +134 -0
- package/package.json +25 -27
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { scaleLinear } from 'd3-scale';
|
|
3
|
+
import HorizontalLine1DPixiTrack from './HorizontalLine1DPixiTrack';
|
|
4
|
+
import { colorToHex } from './utils';
|
|
5
|
+
|
|
6
|
+
class FilledLine extends HorizontalLine1DPixiTrack {
|
|
7
|
+
drawRange(tile, row, tileXScale, offsetValue) {
|
|
8
|
+
const tileValues = tile.tileData.dense;
|
|
9
|
+
// draw a single row from this matrix
|
|
10
|
+
let currentSegment = [];
|
|
11
|
+
let mv = 0;
|
|
12
|
+
|
|
13
|
+
for (let i = 0; i < tile.tileData.shape[1]; i++) {
|
|
14
|
+
const rowStart = row * tile.tileData.shape[1];
|
|
15
|
+
const pos = rowStart + i;
|
|
16
|
+
|
|
17
|
+
if (tileValues[pos] > mv) {
|
|
18
|
+
mv = tileValues[pos];
|
|
19
|
+
}
|
|
20
|
+
const xPos = this._xScale(tileXScale(i));
|
|
21
|
+
const yPos = this.valueScale(tileValues[pos] + offsetValue);
|
|
22
|
+
|
|
23
|
+
if (
|
|
24
|
+
(this.options.valueScaling === 'log' && tileValues[pos] === 0) ||
|
|
25
|
+
Number.isNaN(yPos)
|
|
26
|
+
) {
|
|
27
|
+
if (currentSegment.length > 1) {
|
|
28
|
+
tile.segments.push(currentSegment);
|
|
29
|
+
}
|
|
30
|
+
// Just ignore 1-element segments.
|
|
31
|
+
currentSegment = [];
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (tileXScale(i) > this.tilesetInfo.max_pos[0]) {
|
|
36
|
+
// Data is in the last tile and extends beyond the coordinate system.
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
currentSegment.push([xPos, yPos]);
|
|
41
|
+
}
|
|
42
|
+
if (currentSegment.length > 1) {
|
|
43
|
+
tile.segments.push(currentSegment);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
drawTile(tile) {
|
|
48
|
+
super.drawTile(tile);
|
|
49
|
+
|
|
50
|
+
if (!tile.graphics) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!tile.tileData || !tile.tileData.dense) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const graphics = tile.graphics;
|
|
59
|
+
|
|
60
|
+
const { tileX, tileWidth } = this.getTilePosAndDimensions(
|
|
61
|
+
tile.tileData.zoomLevel,
|
|
62
|
+
tile.tileData.tilePos,
|
|
63
|
+
tile.tileData.shape[1],
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const tileValues = tile.tileData.dense;
|
|
67
|
+
|
|
68
|
+
if (tileValues.length === 0) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const [vs, offsetValue] = this.makeValueScale(
|
|
73
|
+
this.minValue(),
|
|
74
|
+
this.medianVisibleValue,
|
|
75
|
+
this.maxValue(),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
this.valueScale = vs;
|
|
79
|
+
|
|
80
|
+
graphics.clear();
|
|
81
|
+
|
|
82
|
+
this.drawAxis(this.valueScale);
|
|
83
|
+
|
|
84
|
+
if (
|
|
85
|
+
this.options.valueScaling === 'log' &&
|
|
86
|
+
this.valueScale.domain()[1] < 0
|
|
87
|
+
) {
|
|
88
|
+
console.warn(
|
|
89
|
+
'Negative values present when using a log scale',
|
|
90
|
+
this.valueScale.domain(),
|
|
91
|
+
);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const stroke = colorToHex(
|
|
96
|
+
this.options.lineStrokeColor ? this.options.lineStrokeColor : 'blue',
|
|
97
|
+
);
|
|
98
|
+
// this scale should go from an index in the data array to
|
|
99
|
+
// a position in the genome coordinates
|
|
100
|
+
if (!this.tilesetInfo.tile_size && !this.tilesetInfo.bins_per_dimension) {
|
|
101
|
+
console.warn(
|
|
102
|
+
'No tileset_info.tile_size or tileset_info.bins_per_dimension',
|
|
103
|
+
this.tilesetInfo,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const tileSize =
|
|
108
|
+
this.tilesetInfo.tile_size || this.tilesetInfo.bins_per_dimension;
|
|
109
|
+
|
|
110
|
+
const tileXScale = scaleLinear()
|
|
111
|
+
.domain([0, tileSize])
|
|
112
|
+
.range([tileX, tileX + tileWidth]);
|
|
113
|
+
|
|
114
|
+
const strokeWidth =
|
|
115
|
+
this.options.lineStrokeWidth !== undefined
|
|
116
|
+
? this.options.lineStrokeWidth
|
|
117
|
+
: 1;
|
|
118
|
+
|
|
119
|
+
tile.segments = [];
|
|
120
|
+
|
|
121
|
+
tile.minYs = [];
|
|
122
|
+
tile.maxYs = [];
|
|
123
|
+
tile.xs = [];
|
|
124
|
+
|
|
125
|
+
for (let i = 0; i < tile.tileData.shape[0]; i++) {
|
|
126
|
+
// for (let i = 0; i < 1; i++) {
|
|
127
|
+
this.drawRange(tile, i, tileXScale, offsetValue);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
for (let j = 0; j < tile.tileData.shape[1]; j++) {
|
|
131
|
+
tile.minYs.push(Number.MAX_SAFE_INTEGER);
|
|
132
|
+
tile.maxYs.push(-Number.MAX_SAFE_INTEGER);
|
|
133
|
+
tile.xs.push(this._xScale(tileXScale(j)));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// find minimum and maximum values
|
|
137
|
+
for (const segment of tile.segments) {
|
|
138
|
+
let counter = 0;
|
|
139
|
+
|
|
140
|
+
const first = segment[0];
|
|
141
|
+
|
|
142
|
+
if (first[1] < tile.minYs[counter]) tile.minYs[counter] = first[1];
|
|
143
|
+
if (first[1] > tile.maxYs[counter]) tile.maxYs[counter] = first[1];
|
|
144
|
+
|
|
145
|
+
const rest = segment.slice(1);
|
|
146
|
+
for (const point of rest) {
|
|
147
|
+
counter += 1;
|
|
148
|
+
|
|
149
|
+
if (point[1] < tile.minYs[counter]) tile.minYs[counter] = point[1];
|
|
150
|
+
if (point[1] > tile.maxYs[counter]) tile.maxYs[counter] = point[1];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// we have to do something funky here to make sure that
|
|
155
|
+
// discontinuous sections are rendered as such
|
|
156
|
+
let startI = 0;
|
|
157
|
+
|
|
158
|
+
const color = this.options.fillColor || 'grey';
|
|
159
|
+
const colorHex = colorToHex(color);
|
|
160
|
+
|
|
161
|
+
const opacity =
|
|
162
|
+
'fillOpacity' in this.options ? this.options.fillOpacity : 0.5;
|
|
163
|
+
|
|
164
|
+
while (startI < tile.xs.length) {
|
|
165
|
+
graphics.beginFill(colorHex, opacity);
|
|
166
|
+
graphics.moveTo(tile.xs[startI], tile.minYs[startI]);
|
|
167
|
+
// draw a filled area around the whole region
|
|
168
|
+
let i = startI + 1;
|
|
169
|
+
|
|
170
|
+
for (; i < tile.xs.length; i++) {
|
|
171
|
+
if (tile.minYs[i] < Number.MAX_SAFE_INTEGER)
|
|
172
|
+
graphics.lineTo(tile.xs[i], tile.minYs[i]);
|
|
173
|
+
else break;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
for (let j = i; j >= startI; j--) {
|
|
177
|
+
if (tile.maxYs[j] > -Number.MAX_SAFE_INTEGER) {
|
|
178
|
+
// console.log('to', xs[i], maxYs[i]);
|
|
179
|
+
graphics.lineTo(tile.xs[j], tile.maxYs[j]);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
graphics.endFill();
|
|
184
|
+
|
|
185
|
+
while (tile.minYs[i] === Number.MAX_SAFE_INTEGER && i < tile.xs.length)
|
|
186
|
+
i++;
|
|
187
|
+
startI = i;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (
|
|
191
|
+
this.options.strokeSingleSeries &&
|
|
192
|
+
this.options.strokeSingleSeries !== 'all'
|
|
193
|
+
) {
|
|
194
|
+
graphics.lineStyle(strokeWidth, stroke, 0);
|
|
195
|
+
} else {
|
|
196
|
+
graphics.lineStyle(strokeWidth, stroke, 1);
|
|
197
|
+
}
|
|
198
|
+
// draw the boundary values
|
|
199
|
+
for (let i = 0; i < tile.segments.length; i++) {
|
|
200
|
+
if (
|
|
201
|
+
this.options.strokeSingleSeries &&
|
|
202
|
+
this.options.strokeSingleSeries !== 'all'
|
|
203
|
+
) {
|
|
204
|
+
// we're only going to be drawing one of these series
|
|
205
|
+
if (this.options.strokeSingleSeries === i + 1) {
|
|
206
|
+
graphics.lineStyle(strokeWidth, stroke, 1);
|
|
207
|
+
} else {
|
|
208
|
+
graphics.lineStyle(0, stroke, 0);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const segment = tile.segments[i];
|
|
213
|
+
const first = segment[0];
|
|
214
|
+
const rest = segment.slice(1);
|
|
215
|
+
graphics.moveTo(first[0], first[1]);
|
|
216
|
+
for (const point of rest) {
|
|
217
|
+
graphics.lineTo(point[0], point[1]);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Export an SVG representation of this track
|
|
224
|
+
*
|
|
225
|
+
* @returns {Array} The two returned DOM nodes are both SVG
|
|
226
|
+
* elements [base,track]. Base is a parent which contains track as a
|
|
227
|
+
* child. Track is clipped with a clipping rectangle contained in base.
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
exportSVG() {
|
|
231
|
+
let track = null;
|
|
232
|
+
let base = null;
|
|
233
|
+
|
|
234
|
+
if (super.exportSVG) {
|
|
235
|
+
[base, track] = super.exportSVG();
|
|
236
|
+
} else {
|
|
237
|
+
base = document.createElement('g');
|
|
238
|
+
track = base;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
base.setAttribute('class', 'exported-line-track');
|
|
242
|
+
const output = document.createElement('g');
|
|
243
|
+
|
|
244
|
+
track.appendChild(output);
|
|
245
|
+
output.setAttribute(
|
|
246
|
+
'transform',
|
|
247
|
+
`translate(${this.position[0]},${this.position[1]})`,
|
|
248
|
+
);
|
|
249
|
+
|
|
250
|
+
const stroke = this.options.lineStrokeColor
|
|
251
|
+
? this.options.lineStrokeColor
|
|
252
|
+
: 'blue';
|
|
253
|
+
|
|
254
|
+
this.visibleAndFetchedTiles().forEach((tile) => {
|
|
255
|
+
// draw the filled area
|
|
256
|
+
const color = this.options.fillColor || 'grey';
|
|
257
|
+
|
|
258
|
+
const opacity =
|
|
259
|
+
'fillOpacity' in this.options ? this.options.fillOpacity : 0.5;
|
|
260
|
+
|
|
261
|
+
let startI = 0;
|
|
262
|
+
|
|
263
|
+
while (startI < tile.xs.length) {
|
|
264
|
+
const g1 = document.createElement('path');
|
|
265
|
+
g1.setAttribute('opacity', opacity);
|
|
266
|
+
g1.setAttribute('fill', color);
|
|
267
|
+
g1.setAttribute('stroke', 'transparent');
|
|
268
|
+
|
|
269
|
+
let d = `M${tile.xs[startI]},${tile.minYs[startI]}`;
|
|
270
|
+
// draw a filled area around the whole region
|
|
271
|
+
let i = startI + 1;
|
|
272
|
+
|
|
273
|
+
for (; i < tile.xs.length; i++) {
|
|
274
|
+
if (tile.minYs[i] < Number.MAX_SAFE_INTEGER)
|
|
275
|
+
d += `L${tile.xs[i]},${tile.minYs[i]}`;
|
|
276
|
+
else break;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
for (let j = i; j >= startI; j--) {
|
|
280
|
+
if (tile.maxYs[j] > -Number.MAX_SAFE_INTEGER) {
|
|
281
|
+
// console.log('to', xs[i], maxYs[i]);
|
|
282
|
+
d += `L${tile.xs[j]},${tile.maxYs[j]}`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
g1.setAttribute('d', d);
|
|
287
|
+
output.appendChild(g1);
|
|
288
|
+
|
|
289
|
+
while (tile.minYs[i] === Number.MAX_SAFE_INTEGER && i < tile.xs.length)
|
|
290
|
+
i++;
|
|
291
|
+
startI = i;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// draw the lines
|
|
295
|
+
const g = document.createElement('path');
|
|
296
|
+
g.setAttribute('fill', 'transparent');
|
|
297
|
+
g.setAttribute('stroke', stroke);
|
|
298
|
+
let d = '';
|
|
299
|
+
|
|
300
|
+
for (const segment of tile.segments) {
|
|
301
|
+
const first = segment[0];
|
|
302
|
+
const rest = segment.slice(1);
|
|
303
|
+
d += `M${first[0]} ${first[1]}`;
|
|
304
|
+
for (const point of rest) {
|
|
305
|
+
d += `L${point[0]} ${point[1]}`;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
g.setAttribute('d', d);
|
|
310
|
+
output.appendChild(g);
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
const gAxis = document.createElement('g');
|
|
314
|
+
gAxis.setAttribute('id', 'axis');
|
|
315
|
+
|
|
316
|
+
// append the axis to base so that it's not clipped
|
|
317
|
+
base.appendChild(gAxis);
|
|
318
|
+
gAxis.setAttribute(
|
|
319
|
+
'transform',
|
|
320
|
+
`translate(${this.axis.pAxis.position.x}, ${this.axis.pAxis.position.y})`,
|
|
321
|
+
);
|
|
322
|
+
|
|
323
|
+
// add the axis to the export
|
|
324
|
+
if (
|
|
325
|
+
this.options.axisPositionHorizontal === 'left' ||
|
|
326
|
+
this.options.axisPositionVertical === 'top'
|
|
327
|
+
) {
|
|
328
|
+
// left axis are shown at the beginning of the plot
|
|
329
|
+
const gDrawnAxis = this.axis.exportAxisLeftSVG(
|
|
330
|
+
this.valueScale,
|
|
331
|
+
this.dimensions[1],
|
|
332
|
+
);
|
|
333
|
+
gAxis.appendChild(gDrawnAxis);
|
|
334
|
+
} else if (
|
|
335
|
+
this.options.axisPositionHorizontal === 'right' ||
|
|
336
|
+
this.options.axisPositionVertical === 'bottom'
|
|
337
|
+
) {
|
|
338
|
+
const gDrawnAxis = this.axis.exportAxisRightSVG(
|
|
339
|
+
this.valueScale,
|
|
340
|
+
this.dimensions[1],
|
|
341
|
+
);
|
|
342
|
+
gAxis.appendChild(gDrawnAxis);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return [base, track];
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export default FilledLine;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
import TrackControl from './TrackControl';
|
|
7
7
|
|
|
8
8
|
// Styles
|
|
9
|
-
import styles from '../styles/GalleryTracks.module.scss';
|
|
10
|
-
import stylesPlot from '../styles/TiledPlot.module.scss';
|
|
11
|
-
import stylesTrack from '../styles/Track.module.scss';
|
|
9
|
+
import styles from '../styles/GalleryTracks.module.scss';
|
|
10
|
+
import stylesPlot from '../styles/TiledPlot.module.scss';
|
|
11
|
+
import stylesTrack from '../styles/Track.module.scss';
|
|
12
12
|
|
|
13
13
|
const STYLES = {
|
|
14
14
|
pointerEvents: 'all',
|
|
@@ -32,85 +32,84 @@ class GalleryTracks extends React.Component {
|
|
|
32
32
|
render() {
|
|
33
33
|
return (
|
|
34
34
|
<div className={clsx('gallery-tracks', styles['gallery-tracks'])}>
|
|
35
|
-
{this.props.tracks
|
|
36
|
-
|
|
35
|
+
{this.props.tracks?.map((track, index) => (
|
|
36
|
+
<div
|
|
37
|
+
key={track.uid || index}
|
|
38
|
+
className={styles['gallery-track']}
|
|
39
|
+
onMouseLeave={this.mouseLeaveHandler.bind(this)}
|
|
40
|
+
style={{
|
|
41
|
+
top: track.height * index,
|
|
42
|
+
right: track.height * index,
|
|
43
|
+
bottom: track.height * index,
|
|
44
|
+
left: track.height * index,
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
className={styles['gallery-sub-track']}
|
|
49
|
+
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
50
|
+
style={{
|
|
51
|
+
top: 0,
|
|
52
|
+
right: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
height: track.height,
|
|
55
|
+
}}
|
|
56
|
+
/>
|
|
57
|
+
<div
|
|
58
|
+
className={styles['gallery-sub-track']}
|
|
59
|
+
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
60
|
+
style={{
|
|
61
|
+
top: 0,
|
|
62
|
+
right: 0,
|
|
63
|
+
bottom: 0,
|
|
64
|
+
width: track.height,
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
<div
|
|
68
|
+
className={styles['gallery-sub-track']}
|
|
69
|
+
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
70
|
+
style={{
|
|
71
|
+
right: 0,
|
|
72
|
+
bottom: 0,
|
|
73
|
+
left: 0,
|
|
74
|
+
height: track.height,
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
<div
|
|
78
|
+
className={styles['gallery-sub-track']}
|
|
79
|
+
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
80
|
+
style={{
|
|
81
|
+
top: 0,
|
|
82
|
+
bottom: 0,
|
|
83
|
+
left: 0,
|
|
84
|
+
width: track.height,
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
37
87
|
<div
|
|
38
|
-
|
|
39
|
-
className={styles['gallery-track']}
|
|
88
|
+
className={styles['gallery-invisible-track']}
|
|
40
89
|
onMouseLeave={this.mouseLeaveHandler.bind(this)}
|
|
41
90
|
style={{
|
|
42
|
-
top: track.height
|
|
43
|
-
right: track.height
|
|
44
|
-
bottom: track.height
|
|
45
|
-
left: track.height
|
|
91
|
+
top: track.height,
|
|
92
|
+
right: track.height,
|
|
93
|
+
bottom: track.height,
|
|
94
|
+
left: track.height,
|
|
46
95
|
}}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
61
|
-
style={{
|
|
62
|
-
top: 0,
|
|
63
|
-
right: 0,
|
|
64
|
-
bottom: 0,
|
|
65
|
-
width: track.height,
|
|
66
|
-
}}
|
|
67
|
-
/>
|
|
68
|
-
<div
|
|
69
|
-
className={styles['gallery-sub-track']}
|
|
70
|
-
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
71
|
-
style={{
|
|
72
|
-
right: 0,
|
|
73
|
-
bottom: 0,
|
|
74
|
-
left: 0,
|
|
75
|
-
height: track.height,
|
|
76
|
-
}}
|
|
77
|
-
/>
|
|
78
|
-
<div
|
|
79
|
-
className={styles['gallery-sub-track']}
|
|
80
|
-
onMouseEnter={this.mouseEnterHandler.bind(this)}
|
|
81
|
-
style={{
|
|
82
|
-
top: 0,
|
|
83
|
-
bottom: 0,
|
|
84
|
-
left: 0,
|
|
85
|
-
width: track.height,
|
|
86
|
-
}}
|
|
87
|
-
/>
|
|
88
|
-
<div
|
|
89
|
-
className={styles['gallery-invisible-track']}
|
|
90
|
-
onMouseLeave={this.mouseLeaveHandler.bind(this)}
|
|
91
|
-
style={{
|
|
92
|
-
top: track.height,
|
|
93
|
-
right: track.height,
|
|
94
|
-
bottom: track.height,
|
|
95
|
-
left: track.height,
|
|
96
|
-
}}
|
|
96
|
+
/>
|
|
97
|
+
{this.props.editable && (
|
|
98
|
+
<TrackControl
|
|
99
|
+
configMenuVisible={true}
|
|
100
|
+
imgStyleAdd={STYLES}
|
|
101
|
+
imgStyleClose={STYLES}
|
|
102
|
+
imgStyleMove={STYLES}
|
|
103
|
+
imgStyleSettings={STYLES}
|
|
104
|
+
isMoveable={false}
|
|
105
|
+
isVisible={this.state.hovering}
|
|
106
|
+
onCloseTrackMenuOpened={this.props.onCloseTrackMenuOpened}
|
|
107
|
+
onConfigTrackMenuOpened={this.props.onConfigTrackMenuOpened}
|
|
108
|
+
uid={track.uid || index}
|
|
97
109
|
/>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
imgStyleAdd={STYLES}
|
|
102
|
-
imgStyleClose={STYLES}
|
|
103
|
-
imgStyleMove={STYLES}
|
|
104
|
-
imgStyleSettings={STYLES}
|
|
105
|
-
isMoveable={false}
|
|
106
|
-
isVisible={this.state.hovering}
|
|
107
|
-
onCloseTrackMenuOpened={this.props.onCloseTrackMenuOpened}
|
|
108
|
-
onConfigTrackMenuOpened={this.props.onConfigTrackMenuOpened}
|
|
109
|
-
uid={track.uid || index}
|
|
110
|
-
/>
|
|
111
|
-
)}
|
|
112
|
-
</div>
|
|
113
|
-
))}
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
))}
|
|
114
113
|
</div>
|
|
115
114
|
);
|
|
116
115
|
}
|