Code Monkey home page Code Monkey logo

Comments (4)

gala8y avatar gala8y commented on July 2, 2024

I can confirm, it does not work on all notes when window is split both vertically and horizontally (more then two notes) in various configurations. At least one note can not be maximized (other notes are getting hidden, but size of note to be maximized stays the same).

from maximise-active-pane-obsidian.

AlansCodeLog avatar AlansCodeLog commented on July 2, 2024

Ran into a similar problem. I have three horizontally split panes to the left and one large pane to the right. As a workaround added this to my css:

.maximised .workspace-leaf.mod-active {
   flex-basis: calc(100% - 4px) !important; /* 4px is for scrollbar width */
}

from maximise-active-pane-obsidian.

gala8y avatar gala8y commented on July 2, 2024

hi again ;) i still get problems maximizing note sometimes - there is a special set up of notes (window split both horizontally and vertically), which breaks maximizing. its seems like T divisions are fine, but any 'cross' division, even if arms of cross are not aligned (not starting from one point), breaks it all.
please see screens, its kinda hard to catch any rules here:

this works (all notes maximize fine):
image

adding this breaks maximizing of all notes...
image

... like this...
image

... like this.
image

from maximise-active-pane-obsidian.

AlansCodeLog avatar AlansCodeLog commented on July 2, 2024

Can confirm this. I didn't realize it at first but obsidian nests the splits making it really hard to implement something like this that always works. The only workaround I could find that does work all the time requires position fixed, but this means you cannot open the left side panel (you can sort of have the right one work). Alternatively, right/left could be set to 0 and the panels are never visible (this is what I'm personally doing since I use this mode when I want to take notes in a corner of the screen)

.maximised .workspace-leaf.mod-active {
    position: fixed;
    top: 22px; /* title bar height */
    left: 30px; /* show left panel ribbon, but you won't be able to open */
    right: 30px; /* show right panel ribbon */
    bottom: 0;
    width: calc(100% - 60px); /* can just be 100% if you set right/left 0 */
    height: 100%;
    z-index: 16; /* 15 is the panel borders */
}

/* make right panel be above the maximized panel - this cannot be used/reversed for
the left panel due to how sibling selectors work, someday attr() will save us but
currently no browser supports it for numbers */
.workspace > .maximised ~ .workspace-split:last-of-type {
	z-index:17;
}

A css only fix would required that the maximized class be one level above so we can do .maximised .workspace-split:last/first-of-type and set the side panels above anytime we maximize. Am not familiar with obsidian's api so don't know how possible this is.

This does change the way the panels work though. A fix true to the original intention of the plugin would require watching the side pabels for width changes and applying those changes to the maximized panel via js which I have no idea how possible that is.

from maximise-active-pane-obsidian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.