Comments (12)
Now how can I say:
Split(['one', 'two'], {
sizes: ['30px', 'remaining of the container width'],
});
from split.
I think this will look something like this:
Split(['one', 'two'], {
sizes: ['30px', '560px'],
});
Might as well add support for any CSS value. The numeric values ([50, 50]
) would still be interpreted as percentages for backwards compatibility.
from split.
Seems like a handy use case. How does something like this look?
Split(['one', 'two'], {
sizes: ['30px', None],
});
For setting both sides, something like this?
Split(['one', 'two', 'three'], {
sizes: ['30px', None, '30px'],
});
from split.
What about 'auto' instead of ''None'?
On Oct 21, 2015 12:47 PM, "Nathan Cahill" [email protected] wrote:
Seems like a handy use case. How does something like this look?
Split(['one', 'two'], {
sizes: ['30px', None],
});For setting both sides, something like this?
Split(['one', 'two', 'three'], {
sizes: ['30px', None, '30px'],
});—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from split.
Opps, right. Switching between writing Javascript and Python. 'auto' is much better.
from split.
As I'm working on this, I realized a problem with the 'px' sizes. When changing the browser window size, the sizes will not adjust like they do with calc(% - 5px). I think the desired behavior for 'auto' would be to automatically fill the space.
from split.
Right! Any progress?
from split.
Haven't come up with a clean way to do this, no.
from split.
How about calculating the percentage at DOMReady, so if the sizes are set to ['30px', None, '30px'], inside an element that's 300px you could compute it down to ['10%', auto, '10%'], then when the window resizes everything still works...just a thought
from split.
Good idea @jolyonruss. Would 10%, 80%, 10% be the expected behavior though (fully flexible)? Or would you expect 30px, auto, 30px (fixed on the sides, flexible in the middle).
I'll take a swing at implementing the first.
from split.
Hey, might I also suggest using Flexbox for 'auto'?
That's the way it was done in atom: atom/atom#5902
from split.
Support is added for flexbox in v1.2.0. I'd rather leave this feature out of the library and allow users to implement it by calculating the desired initial percentages beforehand.
from split.
Related Issues (20)
- How to update properties without destroying and reinitialization? HOT 1
- showing error: requested module does not provide an export named 'Split'
- React split - add support for dynamically added panes
- the div nestes in gutter can't response to onclick?
- [Split-Grid] Gutters should be used in a two-dimensional way.
- Multiple track registration constructor vs add api (split-grid) HOT 1
- [split-grid] columnMaxSize(s) not working HOT 2
- [Split-Grid]: typo in typescript types HOT 4
- [React Split Grid] Example from docu doesn't work for me HOT 2
- Is there a way to make Split work without gaps/gutters?
- Split.js: drag is not stopped before destroy
- Style : gutter cursor style when hover HOT 2
- Intervention : IgnoredEventCancel
- Server Error HOT 2
- Fetaure request: Allow individual min/max sizing of elements
- Error: 'Split' cannot be used as a JSX component - TS2786
- TypeError: Object prototype may only be an Object or null: undefined HOT 4
- [Split-Grid] `fr` explosion HOT 1
- MinSize ignored if Split created on invisible DOM Elements HOT 1
- Resize of row/column is not working when Split() is included directly in html (instead of separate script)
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 split.