瀏覽代碼

Improve pathfinder sizing

tags/v0.1_first_draft
Dejvino 8 月之前
父節點
當前提交
9bd32c1032
共有 3 個檔案被更改,包括 6 行新增7 行删除
  1. +0
    -1
      module/pathfinder/grid.css
  2. +2
    -2
      module/pathfinder/main.js
  3. +4
    -4
      slides/intro.md

+ 0
- 1
module/pathfinder/grid.css 查看文件

@@ -1,6 +1,5 @@
.main-grid-container{ .main-grid-container{
height: 100%;
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
justify-content: center; justify-content: center;


+ 2
- 2
module/pathfinder/main.js 查看文件

@@ -83,7 +83,7 @@ function spawnPathfinder(root) {
let algo_select = root.getElementsByClassName("algo-select")[0]; let algo_select = root.getElementsByClassName("algo-select")[0];
let maze_algo_select = root.getElementsByClassName("maze-algo-select")[0]; let maze_algo_select = root.getElementsByClassName("maze-algo-select")[0];
const window_y = body.scrollHeight - navbar_HTML.scrollHeight;
const window_y = (body.scrollHeight - navbar_HTML.scrollHeight);
const window_x = body.scrollWidth; const window_x = body.scrollWidth;
let horizontal_cells; let horizontal_cells;
@@ -101,7 +101,7 @@ function spawnPathfinder(root) {
vertical_cells = Math.floor(window_y / 35); vertical_cells = Math.floor(window_y / 35);
horizontal_cells = Math.floor( (window_x - horizontal_cells) /35); horizontal_cells = Math.floor( (window_x - horizontal_cells) /35);
vertical_cells = Math.floor( (window_y - vertical_cells) / 35);
vertical_cells = Math.floor( (window_y - vertical_cells) / 35 * 0.9);
grid_HTML.style.width = `${horizontal_cells * 35}px`; grid_HTML.style.width = `${horizontal_cells * 35}px`;
grid_HTML.style.height = `${vertical_cells * 30}px`; grid_HTML.style.height = `${vertical_cells * 30}px`;


+ 4
- 4
slides/intro.md 查看文件

@@ -20,13 +20,13 @@
<!-- .slide: data-transition="fade-in slide-out" --> <!-- .slide: data-transition="fade-in slide-out" -->
😐 "I don't feel like it." 😐 "I don't feel like it."


"I'm too tired now." 😪 <!-- .element: class="fragment" -->
"I'm way too tired." 😪 <!-- .element: class="fragment" -->


😕 "I don't know how to do it." <!-- .element: class="fragment" --> 😕 "I don't know how to do it." <!-- .element: class="fragment" -->


"I'm too busy now." 🧐 <!-- .element: class="fragment" -->
"I'm very busy now." 🧐 <!-- .element: class="fragment" -->


😇 "I'll do it, but first [☕]." <!-- .element: class="fragment" -->
😇 "I will do it, but first [☕]." <!-- .element: class="fragment" -->


-V- -V-


@@ -36,7 +36,7 @@


### Expanding potential ### Expanding potential


Never before did we have so much...
Never before in history did we have so much... <!-- .element: class="fragment" -->


- life expectancy, safety, stability <!-- .element: class="fragment" --> - life expectancy, safety, stability <!-- .element: class="fragment" -->
- freedom, opportunity <!-- .element: class="fragment" --> - freedom, opportunity <!-- .element: class="fragment" -->


Loading…
取消
儲存