Skip to content

Commit

Permalink
Performance Optimizations and Viewport Feature (#135)
Browse files Browse the repository at this point in the history
* bind viewport to graph

* bind viewport to graph bounds && comments

* first LOD optimizations

* minimap optimizations

* quickfix simple_draw after invisible check

* added connector LOD

* first mousehandler optimizations (only highlight when close)

* mousehandler highlighting optimization (only redraw on change)

* arrowhead LOD

* fixed connectors rendered when invisible

* fixed edges rendered even if not visible

* added loading animation for relayout tasks

* added missing loading animation for settings change

* fixed mousehandler highlighting and solved state-outline performance issues

* changed state LOD formula

* removed adaptiveHideContent option from user settings menu

* reworked user settings menu, added curved edges setting, added adaptiveStateHiding setting again with a warning

* checked all lod occurrences

* added loading animation to settings menu
  • Loading branch information
LeandroTreu authored Mar 27, 2024
1 parent d686768 commit 8df3afc
Show file tree
Hide file tree
Showing 8 changed files with 902 additions and 341 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ <h3 id="sidebar-header">
</form>
</div>
</div>
<div class="col-auto d-flex align-items-center">
<div id="task-info-field">
</div>
</div>
</div>
</div>
<div id="contents"></div>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions scss/sdfv.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ body.sdfv {
font-family: "Segoe UI", Arial, sans-serif;
}

// Loading animation
.loader {
border: 4px solid #ffffff;
border-top: 7px solid #34db50;
border-radius: 50%;
width: 25px;
height: 25px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.sdfv {

.hidden {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/canvas_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,9 @@ export class CanvasManager {
this.renderer.draw(dt);
this.contention -= 1;

if (this.animation_end !== null && now < this.animation_end)
if (this.animation_end !== null && now < this.animation_end) {
this.draw_async();
}
}

public draw_async(): void {
Expand Down
Loading

0 comments on commit 8df3afc

Please sign in to comment.