Compare commits

..

No commits in common. "fb27b4c46aeb289619db731599cfe06d00733d36" and "b3470dce7b4e6983cd04b65c13805453d8ee5966" have entirely different histories.

7 changed files with 7 additions and 43 deletions

View File

@ -316,11 +316,6 @@ class PushPull(WebSocketHandler):
for socket in websockets:
socket.write_message({"course" : content})
@classmethod
def update_scroll(cls, content):
for socket in websockets:
socket.write_message({"scroll" : content[0]/float(content[1])})
def open(self):
if self not in websockets:
websockets.append(self)
@ -397,6 +392,5 @@ async def main(base_path):
Publisher.subscribe("PushPull", "title", PushPull.update_title)
Publisher.subscribe("PushPull", "course", PushPull.update_course)
Publisher.subscribe("PushPull", "date", PushPull.update_date)
Publisher.subscribe("PushPull", "scroll", PushPull.update_scroll)
application.listen(8888)
await asyncio.Event().wait()

View File

@ -1,5 +1,3 @@
type Set
predicate SubSet(Set s1, Set s2)
predicate Disjoint(Set s1, Set s2)
predicate Union(Set s1, Set s2)

View File

@ -1,37 +1,17 @@
canvas {
width = 500
height = 500
width = 100
height = 100
}
forall Set A; Set B
where SubSet(A, B) {
ensure disjoint(B.text, A.icon, 10.0)
ensure contains(A.icon, B.icon, 5.0)
layer A.icon above B.icon
}
forall Set A; Set B
where Disjoint(A, B) {
ensure disjoint(A.icon, B.icon)
}
forall Set A; Set B
where Union(A,B) {
ensure overlapping(A.icon, B.icon)
ensure disjoint(A.text, B.icon)
ensure disjoint(B.text, A.icon)
A.icon above B.icon
}
forall Set x {
shape x.icon = Circle {
x.icon = Circle {
strokeWidth : 0.0
}
shape x.text = Equation {
string : x.label
fontSize : "32px"
}
ensure contains(x.icon, x.text)
encourage norm(x.text.center - x.icon.center) == 0
layer x.text above x.icon
ensure x.icon.r > 25.0
ensure x.icon.r > 25
}

View File

@ -1 +0,0 @@
~/.local/bin/pex ./Server/ -o MarkdownPreviewer.pex -e MarkdownPreviewer:launcher -r ./Server/requirements.txt

View File

@ -80,7 +80,7 @@ function module.setup()
local base_location = cwd:gsub("lua/MarkdownPreviewer", "")
o.cmd = {
base_location .. "MarkdownPreviewer.pex",
base_location .. "Server/test.pex",
"--base",
base_location
}

View File

@ -43,7 +43,7 @@ function module.open()
group = augroup,
buffer = bufnr,
callback = function()
server_connection:scroll({vim.fn.line('.'), vim.fn.line('$')})
server_connection:scroll(vim.fn.line('.'))
end,
})

View File

@ -77,13 +77,6 @@
Object.entries(data).forEach(([k,v]) => {
console.log(k,v);
switch (k) {
case "scroll":
var height = window.innerHeight
|| document.documentElement.clientHeight
|| document.body.clientHeight;
window.scrollTo({left : 0, top: height * v, behavior: 'smooth'});
break;
case "show":
change_body(v)
break;