Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 3dmol zoom and expose zoom props #562

Merged
merged 10 commits into from
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:
python -m venv venv
. venv/bin/activate
git clone --depth 1 https://github.com/plotly/dash.git dash-main
cd dash-main && pip install -e .[dev,testing]
cd dash-renderer && npm ci && npm run build && pip install -e . && cd ../..
cd dash-main && pip install -e .[dev,testing] --progress-bar off && renderer build && cd ../
npm run build

- run:
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## UNRELEASED

### Fixed
* [#561](https://github.com/plotly/dash-bio/pull/561) Repeated re-rendering of the Molecule3dViewer component caused the viewer zoom to decrease multiplicatively.
This fix also exposes the `zoom` and `zoomTo` props for this component.


## [0.7.0] - 2021-04-19

### Fixed
Expand All @@ -12,7 +19,7 @@
* [#554](https://github.com/plotly/dash-bio/pull/554) Added additional props and arbitrary layout arguments to VolcanoPlot.

### Changed
- [#550](https://github.com/plotly/dash-bio/pull/548) Updated CONTRIBUTING.md andbasic demo app structure. In addition, removed residual code and pre-deploy scripts associated with now-discontinued Dash Bio gallery.
- [#550](https://github.com/plotly/dash-bio/pull/548) Updated CONTRIBUTING.md andbasic demo app structure. In addition, removed residual code and pre-deploy scripts associated with now-discontinued Dash Bio gallery.

## [0.6.1] - 2021-02-15
### Fixed
Expand Down
6 changes: 3 additions & 3 deletions R/dashbioAlignmentChart.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioAlignmentChart <- function(id=NULL, eventDatum=NULL, data=NULL, extension=NULL, colorscale=NULL, opacity=NULL, textcolor=NULL, textsize=NULL, showlabel=NULL, showid=NULL, showconservation=NULL, conservationcolor=NULL, conservationcolorscale=NULL, conservationopacity=NULL, conservationmethod=NULL, correctgap=NULL, showgap=NULL, gapcolor=NULL, gapcolorscale=NULL, gapopacity=NULL, groupbars=NULL, showconsensus=NULL, tilewidth=NULL, tileheight=NULL, overview=NULL, numtiles=NULL, scrollskip=NULL, tickstart=NULL, ticksteps=NULL, width=NULL, height=NULL) {
dashbioAlignmentChart <- function(id=NULL, colorscale=NULL, conservationcolor=NULL, conservationcolorscale=NULL, conservationmethod=NULL, conservationopacity=NULL, correctgap=NULL, data=NULL, eventDatum=NULL, extension=NULL, gapcolor=NULL, gapcolorscale=NULL, gapopacity=NULL, groupbars=NULL, height=NULL, numtiles=NULL, opacity=NULL, overview=NULL, scrollskip=NULL, showconsensus=NULL, showconservation=NULL, showgap=NULL, showid=NULL, showlabel=NULL, textcolor=NULL, textsize=NULL, tickstart=NULL, ticksteps=NULL, tileheight=NULL, tilewidth=NULL, width=NULL) {

props <- list(id=id, eventDatum=eventDatum, data=data, extension=extension, colorscale=colorscale, opacity=opacity, textcolor=textcolor, textsize=textsize, showlabel=showlabel, showid=showid, showconservation=showconservation, conservationcolor=conservationcolor, conservationcolorscale=conservationcolorscale, conservationopacity=conservationopacity, conservationmethod=conservationmethod, correctgap=correctgap, showgap=showgap, gapcolor=gapcolor, gapcolorscale=gapcolorscale, gapopacity=gapopacity, groupbars=groupbars, showconsensus=showconsensus, tilewidth=tilewidth, tileheight=tileheight, overview=overview, numtiles=numtiles, scrollskip=scrollskip, tickstart=tickstart, ticksteps=ticksteps, width=width, height=height)
props <- list(id=id, colorscale=colorscale, conservationcolor=conservationcolor, conservationcolorscale=conservationcolorscale, conservationmethod=conservationmethod, conservationopacity=conservationopacity, correctgap=correctgap, data=data, eventDatum=eventDatum, extension=extension, gapcolor=gapcolor, gapcolorscale=gapcolorscale, gapopacity=gapopacity, groupbars=groupbars, height=height, numtiles=numtiles, opacity=opacity, overview=overview, scrollskip=scrollskip, showconsensus=showconsensus, showconservation=showconservation, showgap=showgap, showid=showid, showlabel=showlabel, textcolor=textcolor, textsize=textsize, tickstart=tickstart, ticksteps=ticksteps, tileheight=tileheight, tilewidth=tilewidth, width=width)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'AlignmentChart',
namespace = 'dash_bio',
propNames = c('id', 'eventDatum', 'data', 'extension', 'colorscale', 'opacity', 'textcolor', 'textsize', 'showlabel', 'showid', 'showconservation', 'conservationcolor', 'conservationcolorscale', 'conservationopacity', 'conservationmethod', 'correctgap', 'showgap', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'showconsensus', 'tilewidth', 'tileheight', 'overview', 'numtiles', 'scrollskip', 'tickstart', 'ticksteps', 'width', 'height'),
propNames = c('id', 'colorscale', 'conservationcolor', 'conservationcolorscale', 'conservationmethod', 'conservationopacity', 'correctgap', 'data', 'eventDatum', 'extension', 'gapcolor', 'gapcolorscale', 'gapopacity', 'groupbars', 'height', 'numtiles', 'opacity', 'overview', 'scrollskip', 'showconsensus', 'showconservation', 'showgap', 'showid', 'showlabel', 'textcolor', 'textsize', 'tickstart', 'ticksteps', 'tileheight', 'tilewidth', 'width'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioCircos.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioCircos <- function(enableDownloadSVG=NULL, enableZoomPan=NULL, id=NULL, style=NULL, eventDatum=NULL, selectEvent=NULL, layout=NULL, config=NULL, size=NULL, tracks=NULL) {
dashbioCircos <- function(id=NULL, config=NULL, enableDownloadSVG=NULL, enableZoomPan=NULL, eventDatum=NULL, layout=NULL, selectEvent=NULL, size=NULL, style=NULL, tracks=NULL) {

props <- list(enableDownloadSVG=enableDownloadSVG, enableZoomPan=enableZoomPan, id=id, style=style, eventDatum=eventDatum, selectEvent=selectEvent, layout=layout, config=config, size=size, tracks=tracks)
props <- list(id=id, config=config, enableDownloadSVG=enableDownloadSVG, enableZoomPan=enableZoomPan, eventDatum=eventDatum, layout=layout, selectEvent=selectEvent, size=size, style=style, tracks=tracks)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Circos',
namespace = 'dash_bio',
propNames = c('enableDownloadSVG', 'enableZoomPan', 'id', 'style', 'eventDatum', 'selectEvent', 'layout', 'config', 'size', 'tracks'),
propNames = c('id', 'config', 'enableDownloadSVG', 'enableZoomPan', 'eventDatum', 'layout', 'selectEvent', 'size', 'style', 'tracks'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioFornaContainer.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioFornaContainer <- function(id=NULL, height=NULL, width=NULL, sequences=NULL, nodeFillColor=NULL, colorScheme=NULL, customColors=NULL, allowPanningAndZooming=NULL) {
dashbioFornaContainer <- function(id=NULL, allowPanningAndZooming=NULL, colorScheme=NULL, customColors=NULL, height=NULL, nodeFillColor=NULL, sequences=NULL, width=NULL) {

props <- list(id=id, height=height, width=width, sequences=sequences, nodeFillColor=nodeFillColor, colorScheme=colorScheme, customColors=customColors, allowPanningAndZooming=allowPanningAndZooming)
props <- list(id=id, allowPanningAndZooming=allowPanningAndZooming, colorScheme=colorScheme, customColors=customColors, height=height, nodeFillColor=nodeFillColor, sequences=sequences, width=width)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'FornaContainer',
namespace = 'dash_bio',
propNames = c('id', 'height', 'width', 'sequences', 'nodeFillColor', 'colorScheme', 'customColors', 'allowPanningAndZooming'),
propNames = c('id', 'allowPanningAndZooming', 'colorScheme', 'customColors', 'height', 'nodeFillColor', 'sequences', 'width'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioIdeogram.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioIdeogram <- function(id=NULL, style=NULL, className=NULL, annotationsLayout=NULL, annotations=NULL, annotationsPath=NULL, annotationsData=NULL, annotationTracks=NULL, annotationHeight=NULL, annotationsColor=NULL, histogramScaling=NULL, barWidth=NULL, showAnnotTooltip=NULL, assembly=NULL, brush=NULL, brushData=NULL, container=NULL, chrHeight=NULL, chrMargin=NULL, chrWidth=NULL, chromosomes=NULL, dataDir=NULL, organism=NULL, localOrganism=NULL, homology=NULL, perspective=NULL, fullChromosomeLabels=NULL, resolution=NULL, filterable=NULL, orientation=NULL, ploidy=NULL, ploidyDesc=NULL, ancestors=NULL, rangeSet=NULL, rotatable=NULL, rotated=NULL, sex=NULL, showChromosomeLabels=NULL, showBandLabels=NULL, showFullyBanded=NULL, showNonNuclearChromosomes=NULL) {
dashbioIdeogram <- function(id=NULL, ancestors=NULL, annotationHeight=NULL, annotationTracks=NULL, annotations=NULL, annotationsColor=NULL, annotationsData=NULL, annotationsLayout=NULL, annotationsPath=NULL, assembly=NULL, barWidth=NULL, brush=NULL, brushData=NULL, chrHeight=NULL, chrMargin=NULL, chrWidth=NULL, chromosomes=NULL, className=NULL, container=NULL, dataDir=NULL, filterable=NULL, fullChromosomeLabels=NULL, histogramScaling=NULL, homology=NULL, localOrganism=NULL, organism=NULL, orientation=NULL, perspective=NULL, ploidy=NULL, ploidyDesc=NULL, rangeSet=NULL, resolution=NULL, rotatable=NULL, rotated=NULL, sex=NULL, showAnnotTooltip=NULL, showBandLabels=NULL, showChromosomeLabels=NULL, showFullyBanded=NULL, showNonNuclearChromosomes=NULL, style=NULL) {

props <- list(id=id, style=style, className=className, annotationsLayout=annotationsLayout, annotations=annotations, annotationsPath=annotationsPath, annotationsData=annotationsData, annotationTracks=annotationTracks, annotationHeight=annotationHeight, annotationsColor=annotationsColor, histogramScaling=histogramScaling, barWidth=barWidth, showAnnotTooltip=showAnnotTooltip, assembly=assembly, brush=brush, brushData=brushData, container=container, chrHeight=chrHeight, chrMargin=chrMargin, chrWidth=chrWidth, chromosomes=chromosomes, dataDir=dataDir, organism=organism, localOrganism=localOrganism, homology=homology, perspective=perspective, fullChromosomeLabels=fullChromosomeLabels, resolution=resolution, filterable=filterable, orientation=orientation, ploidy=ploidy, ploidyDesc=ploidyDesc, ancestors=ancestors, rangeSet=rangeSet, rotatable=rotatable, rotated=rotated, sex=sex, showChromosomeLabels=showChromosomeLabels, showBandLabels=showBandLabels, showFullyBanded=showFullyBanded, showNonNuclearChromosomes=showNonNuclearChromosomes)
props <- list(id=id, ancestors=ancestors, annotationHeight=annotationHeight, annotationTracks=annotationTracks, annotations=annotations, annotationsColor=annotationsColor, annotationsData=annotationsData, annotationsLayout=annotationsLayout, annotationsPath=annotationsPath, assembly=assembly, barWidth=barWidth, brush=brush, brushData=brushData, chrHeight=chrHeight, chrMargin=chrMargin, chrWidth=chrWidth, chromosomes=chromosomes, className=className, container=container, dataDir=dataDir, filterable=filterable, fullChromosomeLabels=fullChromosomeLabels, histogramScaling=histogramScaling, homology=homology, localOrganism=localOrganism, organism=organism, orientation=orientation, perspective=perspective, ploidy=ploidy, ploidyDesc=ploidyDesc, rangeSet=rangeSet, resolution=resolution, rotatable=rotatable, rotated=rotated, sex=sex, showAnnotTooltip=showAnnotTooltip, showBandLabels=showBandLabels, showChromosomeLabels=showChromosomeLabels, showFullyBanded=showFullyBanded, showNonNuclearChromosomes=showNonNuclearChromosomes, style=style)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Ideogram',
namespace = 'dash_bio',
propNames = c('id', 'style', 'className', 'annotationsLayout', 'annotations', 'annotationsPath', 'annotationsData', 'annotationTracks', 'annotationHeight', 'annotationsColor', 'histogramScaling', 'barWidth', 'showAnnotTooltip', 'assembly', 'brush', 'brushData', 'container', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'dataDir', 'organism', 'localOrganism', 'homology', 'perspective', 'fullChromosomeLabels', 'resolution', 'filterable', 'orientation', 'ploidy', 'ploidyDesc', 'ancestors', 'rangeSet', 'rotatable', 'rotated', 'sex', 'showChromosomeLabels', 'showBandLabels', 'showFullyBanded', 'showNonNuclearChromosomes'),
propNames = c('id', 'ancestors', 'annotationHeight', 'annotationTracks', 'annotations', 'annotationsColor', 'annotationsData', 'annotationsLayout', 'annotationsPath', 'assembly', 'barWidth', 'brush', 'brushData', 'chrHeight', 'chrMargin', 'chrWidth', 'chromosomes', 'className', 'container', 'dataDir', 'filterable', 'fullChromosomeLabels', 'histogramScaling', 'homology', 'localOrganism', 'organism', 'orientation', 'perspective', 'ploidy', 'ploidyDesc', 'rangeSet', 'resolution', 'rotatable', 'rotated', 'sex', 'showAnnotTooltip', 'showBandLabels', 'showChromosomeLabels', 'showFullyBanded', 'showNonNuclearChromosomes', 'style'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioIgv.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioIgv <- function(id=NULL, style=NULL, className=NULL, genome=NULL, reference=NULL, locus=NULL, minimumBases=NULL, tracks=NULL) {
dashbioIgv <- function(id=NULL, className=NULL, genome=NULL, locus=NULL, minimumBases=NULL, reference=NULL, style=NULL, tracks=NULL) {

props <- list(id=id, style=style, className=className, genome=genome, reference=reference, locus=locus, minimumBases=minimumBases, tracks=tracks)
props <- list(id=id, className=className, genome=genome, locus=locus, minimumBases=minimumBases, reference=reference, style=style, tracks=tracks)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Igv',
namespace = 'dash_bio',
propNames = c('id', 'style', 'className', 'genome', 'reference', 'locus', 'minimumBases', 'tracks'),
propNames = c('id', 'className', 'genome', 'locus', 'minimumBases', 'reference', 'style', 'tracks'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioMolecule2dViewer.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioMolecule2dViewer <- function(id=NULL, selectedAtomIds=NULL, width=NULL, height=NULL, modelData=NULL) {
dashbioMolecule2dViewer <- function(id=NULL, height=NULL, modelData=NULL, selectedAtomIds=NULL, width=NULL) {

props <- list(id=id, selectedAtomIds=selectedAtomIds, width=width, height=height, modelData=modelData)
props <- list(id=id, height=height, modelData=modelData, selectedAtomIds=selectedAtomIds, width=width)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Molecule2dViewer',
namespace = 'dash_bio',
propNames = c('id', 'selectedAtomIds', 'width', 'height', 'modelData'),
propNames = c('id', 'height', 'modelData', 'selectedAtomIds', 'width'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioMolecule3dViewer.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioMolecule3dViewer <- function(id=NULL, selectionType=NULL, backgroundColor=NULL, backgroundOpacity=NULL, styles=NULL, modelData=NULL, atomLabelsShown=NULL, selectedAtomIds=NULL, labels=NULL, orbital=NULL, shapes=NULL, onRenderNewData=NULL, onChangeSelection=NULL) {
dashbioMolecule3dViewer <- function(id=NULL, atomLabelsShown=NULL, backgroundColor=NULL, backgroundOpacity=NULL, labels=NULL, modelData=NULL, onChangeSelection=NULL, onRenderNewData=NULL, orbital=NULL, selectedAtomIds=NULL, selectionType=NULL, shapes=NULL, styles=NULL, zoom=NULL, zoomTo=NULL) {

props <- list(id=id, selectionType=selectionType, backgroundColor=backgroundColor, backgroundOpacity=backgroundOpacity, styles=styles, modelData=modelData, atomLabelsShown=atomLabelsShown, selectedAtomIds=selectedAtomIds, labels=labels, orbital=orbital, shapes=shapes, onRenderNewData=onRenderNewData, onChangeSelection=onChangeSelection)
props <- list(id=id, atomLabelsShown=atomLabelsShown, backgroundColor=backgroundColor, backgroundOpacity=backgroundOpacity, labels=labels, modelData=modelData, onChangeSelection=onChangeSelection, onRenderNewData=onRenderNewData, orbital=orbital, selectedAtomIds=selectedAtomIds, selectionType=selectionType, shapes=shapes, styles=styles, zoom=zoom, zoomTo=zoomTo)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'Molecule3dViewer',
namespace = 'dash_bio',
propNames = c('id', 'selectionType', 'backgroundColor', 'backgroundOpacity', 'styles', 'modelData', 'atomLabelsShown', 'selectedAtomIds', 'labels', 'orbital', 'shapes', 'onRenderNewData', 'onChangeSelection'),
propNames = c('id', 'atomLabelsShown', 'backgroundColor', 'backgroundOpacity', 'labels', 'modelData', 'onChangeSelection', 'onRenderNewData', 'orbital', 'selectedAtomIds', 'selectionType', 'shapes', 'styles', 'zoom', 'zoomTo'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioNeedlePlot.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioNeedlePlot <- function(id=NULL, mutationData=NULL, xlabel=NULL, ylabel=NULL, rangeSlider=NULL, needleStyle=NULL, domainStyle=NULL) {
dashbioNeedlePlot <- function(id=NULL, domainStyle=NULL, mutationData=NULL, needleStyle=NULL, rangeSlider=NULL, xlabel=NULL, ylabel=NULL) {

props <- list(id=id, mutationData=mutationData, xlabel=xlabel, ylabel=ylabel, rangeSlider=rangeSlider, needleStyle=needleStyle, domainStyle=domainStyle)
props <- list(id=id, domainStyle=domainStyle, mutationData=mutationData, needleStyle=needleStyle, rangeSlider=rangeSlider, xlabel=xlabel, ylabel=ylabel)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'NeedlePlot',
namespace = 'dash_bio',
propNames = c('id', 'mutationData', 'xlabel', 'ylabel', 'rangeSlider', 'needleStyle', 'domainStyle'),
propNames = c('id', 'domainStyle', 'mutationData', 'needleStyle', 'rangeSlider', 'xlabel', 'ylabel'),
package = 'dashBio'
)

Expand Down
6 changes: 3 additions & 3 deletions R/dashbioNglMoleculeViewer.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FILE - DO NOT EDIT

dashbioNglMoleculeViewer <- function(id=NULL, width=NULL, height=NULL, stageParameters=NULL, imageParameters=NULL, downloadImage=NULL, pdbString=NULL, data=NULL, molStyles=NULL) {
dashbioNglMoleculeViewer <- function(id=NULL, data=NULL, downloadImage=NULL, height=NULL, imageParameters=NULL, molStyles=NULL, pdbString=NULL, stageParameters=NULL, width=NULL) {

props <- list(id=id, width=width, height=height, stageParameters=stageParameters, imageParameters=imageParameters, downloadImage=downloadImage, pdbString=pdbString, data=data, molStyles=molStyles)
props <- list(id=id, data=data, downloadImage=downloadImage, height=height, imageParameters=imageParameters, molStyles=molStyles, pdbString=pdbString, stageParameters=stageParameters, width=width)
if (length(props) > 0) {
props <- props[!vapply(props, is.null, logical(1))]
}
component <- list(
props = props,
type = 'NglMoleculeViewer',
namespace = 'dash_bio',
propNames = c('id', 'width', 'height', 'stageParameters', 'imageParameters', 'downloadImage', 'pdbString', 'data', 'molStyles'),
propNames = c('id', 'data', 'downloadImage', 'height', 'imageParameters', 'molStyles', 'pdbString', 'stageParameters', 'width'),
package = 'dashBio'
)

Expand Down
Loading