forked from glaserL/viasp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zoom into the graph by pressing `ctrl` key and scrolling the mouse wheel or the trackpad. Zooming widens rows, allowing more space for individual nodes. To pan along the graph, click and drag the graph while pressing the ctrl key. When ctrl is pressed, the `<MainWindow>` places a transparent 'overlay' div on top of the graph. It is managed by the MapInteraction component. Drag and zoom events are captured and handled by functions in the MainWindow. This div captures the zoom and drag events. The overlay is removed when the ctrl key is released. Scrolling along the graph works as before (without ctrl). The scrollable container is the 'content' div. Opening the detail sidebar gives new options to zoom and pan the graph. The zoom range is set so the whole graph can be seen with the sidebar. Also, zoomed graphs keep their positions when the sidebar is opened or closed. Edges and Arrows are updated on the zoomed graph, because the AnimationState includes the current zoom/pan state. In preparation for the zoom behavior, the animations were improved. The AnimationUpdater is responsible for keeping the connections between nodes responsive, i. e. the Edges and Arrows are updated when the nodes change. Nodes change due to expanding their height, expanding recursion or changing the width of the window. During those changes, the animation updater changes state, so that the Edges and Arrows rerender. To manage the performance, use the react hook useResizeObserver, which uses a single ResizeObserver for tracking all elements used by the hooks. The horizontal overflow (showMini) of nodes is now handled by individual branches, instead of the whole row. This is done by moving the checkForOverflow function to the Node, while passing a reference to the branchSpace. Minor fix to improve loading animation: This adds a new propery to a node, `loading`, which is set to `true` when the node is a stand-in while loading data from the backend. This is used to show a loading animation in the node. The uuid of the node is not used to identify this anymore. Minor fix: Large nodes can now be collapsed after being expanded. Minor fix: Improve the zIndex positioning of the edges Positioning the edges inside the row_container works now. It is the best compromise, between available options. The edges sit behind the row_header in the row_container and stay behind when dragging a row. They appear in front of other rows' row_headers, but behind the own row_header. Contributes: #71 Contributes: #61
- Loading branch information
1 parent
268230d
commit 7263420
Showing
24 changed files
with
1,349 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import './draghandle.css'; | ||
import PropTypes from 'prop-types'; | ||
import dragHandleRounded from '@iconify/icons-material-symbols/drag-handle-rounded'; | ||
import {IconWrapper} from '../LazyLoader'; | ||
|
||
export class DragHandle extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
const {dragHandleProps} = this.props; | ||
return ( | ||
<div | ||
className="dragHandle" | ||
{...dragHandleProps} | ||
> | ||
<React.Suspense fallback={<div>=</div>}> | ||
<IconWrapper icon={dragHandleRounded} width="24" /> | ||
</React.Suspense> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
DragHandle.propTypes = { | ||
/** | ||
* an object which should be spread as props on the HTML element to be used as the drag handle. | ||
* The whole item will be draggable by the wrapped element. | ||
**/ | ||
dragHandleProps: PropTypes.object, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.