New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added gutterId to the options #63
Comments
Can you use the |
I did not want to interfere with your split.js, but instead pick up the gutter through Btw, I wanted to post this 'issue' as an enhancement but didn't know how. I'm new on github (but more active on codeproject). Cheers, Reinoud PS: sorry I accidently closed this comment line. Don't know if I can re-open it again... |
it worked re-opening it... hooray |
So onDragEnd isn't being called? Or it is being called but isn't working with the map? |
With my In any case, I'm sort of coding it myself now from scratch using only |
In your profile I see that you specifically work on mapping projects. So you must be familiar with openlayers3? |
Yes, I originally wrote Split.js for a similar interface to the one in your screenshot, and needed onDrag and onDragEnd for resizing the map, the same way you need it. Don't attach the event listeners, instead pass them in the options: Split([..], { |
Aha, funny, isn't it? Passing the callback is a good idea. I'll let you know. I probably not going to implement the onDrag. It is not problem if the map gets squashed or stretched, as long as it refreshes when the mouse is released again. I'm developing this now for my colleagues over the intranet, so it doesn't have to be 100% perfect. As long as they can get to the data and do coord transformations. |
Nathan, I attach my version of splitter panels here. It sits together with a panels module I made earlier and uses the .net-like classes docktop, dockleft, dockfill etc. It works completely with the css flex and only uses js. For the splitter I added a couple of options wrt your splitter: splitter.isFixed, fixedPanel2, minSizePanel1 and minSizePanel2. These are the options I am familiar with working .Net. zip file: veetsplitpanels.zip |
Thanks! |
First of all, thanks for nice project! I've included it in my openlayers project.
Second, I have 'enhanced' the code (I think) by adding a gutterId to the options. It'll set the id of the gutter element created:
`
(...)
var gutter = document.createElement('div')
if (options.gutterId) gutter.id = options.gutterId
(...)
`
Why? Because this way you are able to attach an eventlistener to the gutter using:
`
addListenerById = function(listenertype,id,handlerfunction) {
}
`
Extremely handy to use when the gutter has resized a div and you need to, in my case, redraw the map div/canvas. As you may know, there is no 'resize' event available for a div, only for the window (which isn't resized when the gutter is dragged).
Thought to let you know.
The text was updated successfully, but these errors were encountered: