Comments (3)
Yes, see #30 for some details. Thanks for this and the other report. I am hoping to work on the open issues this week.
from splitview.
This should be fixed with #33. Also, thanks to your suggestion, I added toggle(_ side: SplitSide? = nil)
as a method on SideHolder. The default behavior of toggle()
will remain the same, which is to operate on the .secondary
side. I can see your point that this might couple logically to priority if you are specifying it, but I generally think of these things as orthogonal, and dreaded having to explain about how they were coupled only if you specified priority 🤪.
As a result, though, your example showing the problem now looks like this for me:
VStack {
Split(primary: {
Color.teal
}, secondary: {
Color.green
})
.constraints(minPFraction: minPFraction, priority: .left, dragToHideP: true)
.fraction(fraction)
.hide(hide)
Button("Toggle Hide") {
withAnimation {
hide.toggle(.left)
}
}
}
and works properly. Note that per #30, the splitter is completely hidden (currently by design) when the minPFraction
is specified. I'll be working on making that optional next.
from splitview.
To be clear: when I remove the minPFraction property, it works. So it looks like setting a minimum fraction is incompatible with hiding a split.
from splitview.
Related Issues (20)
- Constraints for Sliding Splitters
- Set SplitView Constraints by absolute number HOT 1
- Nested views ad infinitum HOT 3
- Sticky buttons in secondary views or on press repeat HOT 4
- Feature: minimum split size HOT 8
- Bug: splitter line should be invisible when hidden HOT 2
- divider's visual bug HOT 11
- Option to offset views instead of changing frame size HOT 5
- Breakpoints & animations HOT 1
- Hidden view still visible partly HOT 4
- Custom splitter using drag-to-hide
- Setting fraction programmatically (after the split view is shown already) HOT 2
- CustomSplitter disappears when constraints is set HOT 4
- Default splitter HOT 2
- Issue When Dragging a Splitter Outside the Parent Window on MacOS HOT 4
- Instantiating from a simpler format? HOT 1
- Change cursor on Mac when inside splitter HOT 4
- UserDefaults - working ? HOT 6
- Set SplitView Constraints Maximum HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from splitview.