mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-20 11:28:47 +08:00
enable camera interaction on centroids (#1160)
* pass handleCanvasEvent to graphOverlayLayer * dont pass handlecanvasevent if not interactive
This commit is contained in:
committed by
GitHub
parent
1547a864c2
commit
62e944796b
@@ -749,6 +749,11 @@ class Graph extends React.Component {
|
||||
graphPaddingRightLeft={this.graphPaddingRightLeft}
|
||||
graphPaddingTop={this.graphPaddingTop}
|
||||
responsive={responsive}
|
||||
handleCanvasEvent={
|
||||
graphInteractionMode === "zoom"
|
||||
? this.handleCanvasEvent
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<CentroidLabels />
|
||||
</GraphOverlayLayer>
|
||||
|
||||
@@ -53,7 +53,8 @@ class GraphOverlayLayer extends PureComponent {
|
||||
responsive,
|
||||
graphPaddingRightLeft,
|
||||
graphPaddingTop,
|
||||
children
|
||||
children,
|
||||
handleCanvasEvent
|
||||
} = this.props;
|
||||
|
||||
if (!cameraTF) return null;
|
||||
@@ -89,6 +90,8 @@ class GraphOverlayLayer extends PureComponent {
|
||||
zIndex: 99,
|
||||
backgroundColor: displaying ? "rgba(255, 255, 255, 0.55)" : ""
|
||||
}}
|
||||
onMouseMove={handleCanvasEvent}
|
||||
onWheel={handleCanvasEvent}
|
||||
>
|
||||
<g
|
||||
id="canvas-transformation-group-x"
|
||||
|
||||
Reference in New Issue
Block a user