[mobile] refactoring
This commit is contained in:
parent
751fedc663
commit
9472f77ef0
|
@ -206,10 +206,12 @@ class ContextMenuController extends Component {
|
|||
Common.Notifications.off('document:ready', this.onDocumentReady);
|
||||
|
||||
const api = Common.EditorApi.get();
|
||||
api.asc_unregisterCallback('asc_onShowPopMenu', this.onApiOpenContextMenu);
|
||||
api.asc_unregisterCallback('asc_onHidePopMenu', this.onApiHideContextMenu);
|
||||
api.asc_unregisterCallback('asc_onShowForeignCursorLabel', this.onApiShowForeignCursorLabel);
|
||||
api.asc_unregisterCallback('asc_onHideForeignCursorLabel', this.onApiHideForeignCursorLabel);
|
||||
if ( api ) {
|
||||
api.asc_unregisterCallback('asc_onShowPopMenu', this.onApiOpenContextMenu);
|
||||
api.asc_unregisterCallback('asc_onHidePopMenu', this.onApiHideContextMenu);
|
||||
api.asc_unregisterCallback('asc_onShowForeignCursorLabel', this.onApiShowForeignCursorLabel);
|
||||
api.asc_unregisterCallback('asc_onHideForeignCursorLabel', this.onApiHideForeignCursorLabel);
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
|
@ -31,10 +31,12 @@ const PluginsController = inject('storeAppOptions')(observer(props => {
|
|||
return () => {
|
||||
const api = Common.EditorApi.get();
|
||||
|
||||
api.asc_unregisterCallback("asc_onPluginShow", showPluginModal);
|
||||
api.asc_unregisterCallback("asc_onPluginClose", pluginClose);
|
||||
api.asc_unregisterCallback("asc_onPluginResize", pluginResize);
|
||||
api.asc_unregisterCallback('asc_onPluginsInit', onPluginsInit);
|
||||
if ( api ) {
|
||||
api.asc_unregisterCallback("asc_onPluginShow", showPluginModal);
|
||||
api.asc_unregisterCallback("asc_onPluginClose", pluginClose);
|
||||
api.asc_unregisterCallback("asc_onPluginResize", pluginResize);
|
||||
api.asc_unregisterCallback('asc_onPluginsInit', onPluginsInit);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue