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