Hello,
I am trying to add igsplitter with my angular2/bootstrap/webpack app. On the left side I am having igdatagrid and on right side map component, when I try to move the splitter it does not move but when I do resizing of window it works normally. But after some interaction splitter freezing issue starts.
My Scenario is like below:
1) First full map loads
2) When I click on button datagrid load on left side of map with splitter
3) Again I want to hide the datagrid on click of button
I also wants to know how I can destroy igsplitter, I used igSplitter('destroy') but that is now working. As mentioned above I want to hide the datagrid on click of button so I also need to destroy the igSplitter at the same time.
I tried below code but getting issues as mentioned above.
splitter() { $('.splitter').igSplitter({ height: '100%', panels: [ { size: '50%', min: '25%', max: '100%'}, { size: '50%', min: '25%', max: '100%'} ] }); } stopSplitter() {
$('.splitter').igSplitter("destroy"); $('.splitter').igSplitter("collapseAt", 0); $('.splitter').igSplitter("refreshLayout"); }
Hi Sameer,
Thank you for the sample provided.
The splitter takes care of its panels resizing and setting the bootstrap classes does the same. What happens is on every resize the div that holds the map is pulled down, because there is not enough place in the splitter panel. This breaks the smoothnes too. The fix is to set padding: 0 for the splitter. I have also removed the unnecessary code and wrapped the map in another div - http://jsfiddle.net/fp7wncuc/2/
I believe the sample should meet your requirements.
Hello Timohir,
I have created one example (just modified your existing sample example) as per requirement here http://jsfiddle.net/fp7wncuc/.
Please have a look, you can check the splitter working is not proper. On click of splitter first time the div moves upward, map resize, splitter dragging is not smooth and many more issues.
Please let me know what I am doing wrong and why it is not working properly.
Hello Sameer,
Thank you for contacting us.
I see you are using a lot of frameworks and controls, but could you create a working sample which demonstrates the issue/s? You can try to isolate it as much as possible.
You are using splitter's destroy method correctly. The control should be destroyed.
I am looking forward to hearing from you.