Comments (15)
Yeah, right now nothing is returned from calling Split(). I think a Split instance should be returned, with methods like .destroy(), .collapse(n), .expand(n) where n is the zero indexed pane number.
from split.
+1
this is really important it is blocking us now from using this cool plugin, as sometimes we really want to hide one pane completely or destroy the whole split
from split.
Thanks everyone. I went ahead an implemented something similar, with a few more features in this release. The API now works like this:
var instance = Split([], ...)
instance.collapse(0)
instance.collapse(1)
where 0
and 1
are the indexes for the elements in the split.
Additionally, it's possible to update the sizes now:
instance.setSizes([10, 40, 50])
And destroy the the instance altogether:
instance.destroy()
Docs are updated with the new API. Please update to the latest version, v1.1.1!
from split.
+1
from split.
+1
from split.
+1
from split.
+1
from split.
One of the simpler ways to handle this is to make a click event for the splitter handle and let them handle it.
I wasnt sure the best way to do this (not great at dom specifics and still learning this code) so I just checked to see if you actually dragged and if not then on mouse/touch up, click.
Here's an example of the idea....
http://plnkr.co/edit/ndQdCPAiZ7t6lDA32m4i?p=preview
Oh, and I added an updateOffset to the pairs, so you can do whatever.
from split.
+1
from split.
+1
from split.
+1
from split.
+2
from split.
+10
from split.
+1
from split.
+1
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.