fix: graph init bugs when changing git repository

This commit is contained in:
lxsang 2022-07-04 23:01:35 +02:00
parent 0d1957387c
commit 522031dac0
8 changed files with 29 additions and 15 deletions

View File

@ -85,14 +85,22 @@ namespace OS {
{
this.options[k] = option[k];
}
this.current_y_offset = this.options.y_offset;
this.init_graph();
if(this.options.target)
{
$(this.options.target)
.addClass("git_grapth_container")
.css("overflow-y", "auto")
.css("overflow-x", "hidden")
.css("display", "block")
.css("position", "relative");
}
}
set base_dir(v: VFS.BaseFileHandle)
{
this._base_dir = v;
if(v)
{
this.init_graph();
this.render_next();
}
@ -157,12 +165,17 @@ namespace OS {
{
return this.error(API.throwe("Target element is undefined"));
}
$(this.options.target)
.addClass("git_grapth_container")
.css("overflow-y", "auto")
.css("overflow-x", "hidden")
.css("display", "block")
.css("position", "relative");
this.current_y_offset = this.options.y_offset;
this.lines_data = [];
this.commits = {};
this.oldest_commit_date = undefined;
this.svg_element = undefined;
this.commits_list_element = undefined;
this.load_more_el = undefined;
this.commit_detail_el = undefined;
this.current_head = undefined;
$(this.options.target).empty();
this.svg_element = this.make_svg_el("svg",{
width: this.options.x_offset,
height: this.options.y_offset
@ -173,7 +186,6 @@ namespace OS {
.css("left", "0")
//s.css("z-index", 10)
.css("top", "0");
$(this.options.target).empty();
this.options.target.appendChild(this.svg_element);
const div = $("<div />")
.css("position", "absolute")

View File

@ -14,5 +14,6 @@ graph.base_dir = "home://workspace/repo-git";
```
## Change logs:
- v0.1.2-b: add class to container element
- v0.1.2-b: fix init bug
- v0.1.1-b: add class to container element
- v0.1.0-b: Initial version

View File

@ -14,5 +14,6 @@ graph.base_dir = "home://workspace/repo-git";
```
## Change logs:
- v0.1.2-b: add class to container element
- v0.1.2-b: fix init bug
- v0.1.1-b: add class to container element
- v0.1.0-b: Initial version

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"author": "Dany LE",
"email": "contact@iohub.dev"
},
"version":"0.1.1-a",
"version":"0.1.2-a",
"category":"Development",
"iconclass":"bi bi-git",
"mimes":["dir"],

Binary file not shown.

View File

@ -7,7 +7,7 @@
"author": "Dany LE",
"email": "contact@iohub.dev"
},
"version":"0.1.1-a",
"version":"0.1.2-a",
"category":"Development",
"iconclass":"bi bi-git",
"mimes":["dir"],

View File

@ -165,7 +165,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/README.md",
"category": "Development",
"author": "Dany LE",
"version": "0.1.1-a",
"version": "0.1.2-a",
"dependencies": [],
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GitGraph/build/release/GitGraph.zip"
},