Skip to content
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

SaveState / LoadState #8

Open
betrayedjinn opened this issue Jun 2, 2013 · 3 comments
Open

SaveState / LoadState #8

betrayedjinn opened this issue Jun 2, 2013 · 3 comments

Comments

@betrayedjinn
Copy link

Hi,
i think there is an problem on state saving/loading. (i use dockspawn.js)
I do the following:

var json = dockManager.saveState();
dockManager.loadState(json)

There were some mistakes in code, i think i fixed them correctly but now i get:
-- Splitter panel should contain atleast 2 panels.

What i am doing wrong?

My init code is as followed:

         $("#dashboard").css({ height: $(window).height() - 40, width: $(window).width() });
         $("#dockManager").css({ height: $(window).height() - 60, width: $(window).width() - 20 });
         dockManager = new dockspawn.DockManager($("#dockManager")[0]);
         dockManager.initialize();

         solution = new dockspawn.PanelContainer($("#projectExplorer")[0], dockManager);
         output = new dockspawn.PanelContainer($("#output_window")[0], dockManager);
         properties = new dockspawn.PanelContainer($("#properties_window")[0], dockManager);
         editor = new dockspawn.PanelContainer($("#codeeditor")[0], dockManager);

         documentNode = dockManager.context.model.documentManagerNode;
         editorNode = dockManager.dockFill(documentNode, editor);
         solutionNode = dockManager.dockRight(documentNode, solution, 1);
         propertiesNode = dockManager.dockDown(solutionNode, properties, .4);
         outputNode = dockManager.dockDown(documentNode, output, 0.4);

         solutionNode.container.width = 300;
         propertiesNode.container.width = 300;

         dockManager.invalidate();

Thanks.

@filmackay
Copy link
Collaborator

Yes, this part is not very well tested (in the js port). Can you provide the changes/fixes?

@ghost
Copy link

ghost commented Jul 6, 2015

Could be please provide us with a simple demo describing how to save state and load state in a correct way ASAP . cause i am also facing an issue when saving and loading state ..

@nixkuroi
Copy link

This is still broken. Anyone ever get this working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants