Skip to content

Commit

Permalink
Merge pull request #21 from DoodlesEpic/patch/fullscreen-fix
Browse files Browse the repository at this point in the history
Fix fullscreen needing window change
  • Loading branch information
DoodlesEpic authored Jun 14, 2022
2 parents fd65feb + 042c727 commit a2c373f
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 51 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@tauri-apps/api": "^1.0.0-rc.6",
"@tauri-apps/api": "^1.0.0-rc.7",
"codemirror": "^5.65.3",
"dygraphs": "^2.1.0",
"sirv-cli": "^2.0.2",
Expand Down
46 changes: 18 additions & 28 deletions src-tauri/Cargo.lock

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

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ rust-version = "1.61"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.0.0-rc.12", features = [] }
tauri-build = { version = "1.0.0-rc.13", features = [] }

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.0.0-rc.14", features = ["clipboard-write-text"] }
tauri = { version = "1.0.0-rc.15", features = ["clipboard-write-text"] }
slow_primes = "0.1.14"

[features]
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Cards/ScientificGraph.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
$: csvChartData = ["X,Y\n"]
.concat(primes.map((prime, i) => `${i},${prime}\n`))
.join("");
$: options = {
data: csvChartData,
fullscreen: chartFullscreen,
};
</script>

<div
Expand All @@ -27,5 +32,5 @@
</div>

<h2>Graph</h2>
<DyGraphs bind:data={csvChartData} class="chart" />
<DyGraphs bind:options class="chart" />
</div>
9 changes: 6 additions & 3 deletions src/Components/Util/DyGraphs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
let classes = "";
export let graph = null;
export let data;
export let options = {
data: "",
fullscreen: false,
};
export { classes as class };
let element;
Expand All @@ -15,13 +18,13 @@
createGraph();
});
$: if (element && data) {
$: if (element && options) {
createGraph();
}
function createGraph() {
if (graph) element.innerHTML = "";
graph = new Dygraph(element, data, {});
graph = new Dygraph(element, options.data, {});
}
</script>

Expand Down

0 comments on commit a2c373f

Please sign in to comment.