Skip to content

Commit

Permalink
canvas in flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-cen committed Dec 15, 2022
1 parent c9b3c96 commit 14823bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7358,7 +7358,7 @@ var FlowEditor = class extends nosuper(import_obsidian2.HoverPopover) {
const sizer = this.hoverEl.querySelector(".workspace-leaf");
this.hoverEl.appendChild(sizer);
const inlineTitle = this.hoverEl.querySelector(".inline-title");
inlineTitle.remove();
inlineTitle == null ? void 0 : inlineTitle.remove();
(_b2 = this.onShowCallback) == null ? void 0 : _b2.call(this);
this.onShowCallback = void 0;
}
Expand Down Expand Up @@ -8981,6 +8981,9 @@ var spawnNewPortal = async (plugin, evt) => {
let portalFile = plugin.app.vault.getAbstractFileByPath(file);
const newLeaf = spawnPortal(plugin, el, !from && portalFile.name);
await newLeaf.openFile(portalFile);
if (!newLeaf.view.editor) {
return;
}
const view = (_a2 = newLeaf.view.editor) == null ? void 0 : _a2.cm;
view.dispatch({
annotations: [
Expand Down Expand Up @@ -24179,10 +24182,10 @@ var MakeMDPlugin = class extends import_obsidian15.Plugin {
removeAllFlowMarks(element);
replaceAllEmbed(element, context);
});
window.addEventListener(eventTypes.spawnPortal, this.spawnPortal);
window.addEventListener(eventTypes.loadPortal, this.loadPortal);
window.addEventListener(eventTypes.focusPortal, this.focusPortal);
window.addEventListener(eventTypes.openFilePortal, this.openFileFromPortal);
window.addEventListener(eventTypes.spawnPortal, this.spawnPortal.bind(this));
window.addEventListener(eventTypes.loadPortal, this.loadPortal.bind(this));
window.addEventListener(eventTypes.focusPortal, this.focusPortal.bind(this));
window.addEventListener(eventTypes.openFilePortal, this.openFileFromPortal.bind(this));
}
}
loadMakerMode() {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "make-md",
"name": "MAKE.md",
"version": "0.5.4",
"version": "0.5.5",
"minAppVersion": "0.16.0",
"description": "Make.md brings you features that supercharges Obsidian. Sort your files in custom order and add file icons using Spaces. Edit inline embeds with Flow Editor. And style your text and add new markdown blocks without writing markdown using Maker Mode.",
"author": "MAKE.md",
Expand Down
11 changes: 7 additions & 4 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
.mk-floweditor .markdown-source-view.mod-cm6 .cm-editor {
min-height: auto;
}
.mk-floweditor .workspace-leaf-content[data-type=canvas] .view-content {
height: 600px;
}
.mk-floweditor .cm-content {
padding: 0 !important;
}
Expand Down Expand Up @@ -103,7 +106,7 @@
border-left: var(--embed-border-left);
padding: var(--embed-padding);
}
.mk-flow-seamless .markdown-embed {
.mk-flow-seamless .internal-embed.markdown-embed {
padding: 8px;
border-radius: 4px;
border: thin solid var(--color-base-20);
Expand Down Expand Up @@ -153,13 +156,13 @@
.cm-line:hover > .mk-floweditor-selector {
visibility: visible;
}
.markdown-embed:hover .mk-floweditor-selector {
.internal-embed.markdown-embed:hover .mk-floweditor-selector {
visibility: visible;
}
.mk-flow-classic .markdown-embed > .mk-floweditor-selector {
.mk-flow-classic .internal-embed.markdown-embed > .mk-floweditor-selector {
top: 5px !important;
}
.mk-flow-seamless .markdown-embed > .mk-floweditor-selector {
.mk-flow-seamless .internal-embed.markdown-embed > .mk-floweditor-selector {
top: -22px !important;
right: 4px;
}
Expand Down

0 comments on commit 14823bd

Please sign in to comment.