Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions VS Code/MindElixir/MindElixir.js
Original file line number Diff line number Diff line change
Expand Up @@ -1539,12 +1539,30 @@ const Hn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
return n.id = e, n.innerHTML = Xn[t], n;
};
function Kn(e) {
const t = document.createElement("div"), n = U("toCenter", "living"), o = U("zoomout", "zoomout"), s = U("zoomin", "zoomin");
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
e.toCenter();
const t = document.createElement("div"), n = U("fullscreen", "full"), o = U("toCenter", "living"), s = U("zoomout", "zoomout"), i = U("zoomin", "zoomin");
t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb";
let l = null;
const c = () => {
const a = e.container.getBoundingClientRect(), d = Ze(e.map.style.transform), h = a.width / 2, u = a.height / 2, y = (h - d.x) / e.scaleVal, v = (u - d.y) / e.scaleVal;
l = {
containerRect: a,
currentTransform: d,
mapCenterX: y,
mapCenterY: v
};
}, r = () => {
if (l) {
const a = e.container.getBoundingClientRect(), d = a.width / 2, h = a.height / 2, u = d - l.mapCenterX * e.scaleVal, y = h - l.mapCenterY * e.scaleVal, v = u - l.currentTransform.x, p = y - l.currentTransform.y;
e.move(v, p);
}
};
return e.el.addEventListener("fullscreenchange", r), n.onclick = () => {
c(), document.fullscreenElement !== e.el ? e.el.requestFullscreen() : document.exitFullscreen();
Comment thread
DisciplinedSoftware marked this conversation as resolved.
}, o.onclick = () => {
e.scale(e.scaleVal - e.scaleSensitivity);
e.toCenter();
}, s.onclick = () => {
e.scale(e.scaleVal - e.scaleSensitivity);
}, i.onclick = () => {
e.scale(e.scaleVal + e.scaleSensitivity);
}, t;
}
Expand Down
11 changes: 11 additions & 0 deletions VS Code/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,17 @@ export class CodeMindMapPanel {
background: #1e1e1e;
color: #fff;
}
.mind-elixir-toolbar #fullscreen {
display: none;
}
.mind-elixir-toolbar.rb {
display: flex;
gap: 10px;
align-items: center;
}
.mind-elixir-toolbar.rb span + span {
margin-left: 0;
}
#container {
height: 100vh;
display: flex;
Expand Down
11 changes: 11 additions & 0 deletions Visual Studio/CodeMindMap/CodeMindMapHtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ public class CodeMindMapHtml
<title>Code Mind Map</title>
<link rel=""stylesheet"" href=""http://codemindmap.vsext/MindElixir.css"">
<style>
.mind-elixir-toolbar #fullscreen {
display: none;
}
Comment thread
DisciplinedSoftware marked this conversation as resolved.
.mind-elixir-toolbar.rb {
display: flex;
gap: 10px;
align-items: center;
}
.mind-elixir-toolbar.rb span + span {
margin-left: 0;
}
#map {
width: 100%;
height: 100vh;
Expand Down
26 changes: 22 additions & 4 deletions Visual Studio/CodeMindMap/MindElixir/MindElixir.js
Original file line number Diff line number Diff line change
Expand Up @@ -1539,12 +1539,30 @@ const Hn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
return n.id = e, n.innerHTML = Xn[t], n;
};
function Kn(e) {
const t = document.createElement("div"), n = U("toCenter", "living"), o = U("zoomout", "zoomout"), s = U("zoomin", "zoomin");
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
e.toCenter();
const t = document.createElement("div"), n = U("fullscreen", "full"), o = U("toCenter", "living"), s = U("zoomout", "zoomout"), i = U("zoomin", "zoomin");
t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb";
let l = null;
const c = () => {
const a = e.container.getBoundingClientRect(), d = Ze(e.map.style.transform), h = a.width / 2, u = a.height / 2, y = (h - d.x) / e.scaleVal, v = (u - d.y) / e.scaleVal;
l = {
containerRect: a,
currentTransform: d,
mapCenterX: y,
mapCenterY: v
};
Comment thread
DisciplinedSoftware marked this conversation as resolved.
}, r = () => {
if (l) {
const a = e.container.getBoundingClientRect(), d = a.width / 2, h = a.height / 2, u = d - l.mapCenterX * e.scaleVal, y = h - l.mapCenterY * e.scaleVal, v = u - l.currentTransform.x, p = y - l.currentTransform.y;
e.move(v, p);
}
};
return e.el.addEventListener("fullscreenchange", r), n.onclick = () => {
c(), document.fullscreenElement !== e.el ? e.el.requestFullscreen() : document.exitFullscreen();
Comment thread
DisciplinedSoftware marked this conversation as resolved.
}, o.onclick = () => {
e.scale(e.scaleVal - e.scaleSensitivity);
e.toCenter();
}, s.onclick = () => {
e.scale(e.scaleVal - e.scaleSensitivity);
}, i.onclick = () => {
e.scale(e.scaleVal + e.scaleSensitivity);
}, t;
}
Expand Down
Loading