File tree Expand file tree Collapse file tree
packages/plugin-multiple-editor/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { EditorController } from './Controller' ;
22import { EditorHook } from './EditorHook' ;
3- import type { Event } from '@alilc/lowcode-shell' ;
3+ import type { Skeleton } from '@alilc/lowcode-shell' ;
44
55export enum PluginHooks {
66 onActive = 'onActive' ,
@@ -24,7 +24,7 @@ export class Service extends EditorHook {
2424
2525 public onSelectFileChange = this . hookFactory ( PluginHooks . onSelectFileChange ) ;
2626
27- constructor ( public controller : EditorController , private editor : Event ) {
27+ constructor ( public controller : EditorController , private skeleton : Skeleton ) {
2828 super ( ) ;
2929 }
3030
@@ -41,12 +41,12 @@ export class Service extends EditorHook {
4141 }
4242
4343 private setupHooks ( ) {
44- this . editor . on ( ' skeleton.panel-dock.unactive' , ( pluginName ) => {
44+ this . skeleton . onShowPanel ( ( pluginName ) => {
4545 if ( pluginName === 'codeEditor' ) {
4646 this . triggerHook ( PluginHooks . onDeActive ) ;
4747 }
4848 } ) ;
49- this . editor . on ( ' skeleton.panel-dock.active' , ( pluginName ) => {
49+ this . skeleton . onHidePanel ( ( pluginName ) => {
5050 if ( pluginName === 'codeEditor' ) {
5151 this . triggerHook ( PluginHooks . onActive ) ;
5252 }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ const pluginCodeEditor = (
6262 schemaDock && schemaDock . disable ( ) ;
6363 project . onSimulatorRendererReady ( ( ) => {
6464 schemaDock . enable ( ) ;
65- const service = new Service ( editorController , editor ) ;
65+ const service = new Service ( editorController , ctx . skeleton ) ;
6666 service . init ( { plugins : options . plugins } ) ;
6767 editorController . init ( project , editor , service ) ;
6868 } ) ;
You can’t perform that action at this time.
0 commit comments