opensumi / ide-electron

OpenSumi Electron Version
https://opensumi.com
MIT License
171 stars 56 forks source link

Toggle left and right sidebar not working #36

Closed teddyos closed 1 year ago

teddyos commented 2 years ago

I used this template to init the project, and toggling the sidebars either using UI or

const layoutService = useInjectable<IMainLayoutService>(IMainLayoutService);
layoutService.toggleSlot(SlotLocation.right, false);

didn't work. Please view the recorded below 👇

https://user-images.githubusercontent.com/29925961/179694564-48bb6c35-7fcd-4006-86fc-c071986ccb4a.mov

Thank you for support 🙏

erha19 commented 2 years ago

@nguyenhongphat0 Hi, I create a sample here opensumi-module-samples#7 , you can see the Toggle Panel or Sidebar demo know-how to use it.

erha19 commented 2 years ago

And the Electron client can not get IMainLayoutService service instance directly, maybe you should use a custom EventService to make it work.

teddyos commented 1 year ago

Thank you for your help, I got this issue fixed!