[PE mobile] Fix context menu
This commit is contained in:
parent
465fd40004
commit
4660a3ddcd
|
@ -157,7 +157,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
const { t } = this.props;
|
const { t } = this.props;
|
||||||
const _t = t("ContextMenu", { returnObjects: true });
|
const _t = t("ContextMenu", { returnObjects: true });
|
||||||
|
|
||||||
const { isEdit, canViewComments, canReview, isDisconnected } = this.props;
|
const { isEdit, canViewComments, isDisconnected } = this.props;
|
||||||
|
|
||||||
const api = Common.EditorApi.get();
|
const api = Common.EditorApi.get();
|
||||||
const stack = api.getSelectedElements();
|
const stack = api.getSelectedElements();
|
||||||
|
@ -264,7 +264,7 @@ class ContextMenu extends ContextMenuController {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var hideAddComment = (isText && isChart) || api.can_AddQuotedComment() === false || !canViewComments;
|
const hideAddComment = (isText && isChart) || api.can_AddQuotedComment() === false || !canViewComments;
|
||||||
if (!hideAddComment) {
|
if (!hideAddComment) {
|
||||||
itemsText.push({
|
itemsText.push({
|
||||||
caption: _t.menuAddComment,
|
caption: _t.menuAddComment,
|
||||||
|
|
|
@ -4,12 +4,14 @@ export class storeAppOptions {
|
||||||
constructor() {
|
constructor() {
|
||||||
makeObservable(this, {
|
makeObservable(this, {
|
||||||
isEdit: observable,
|
isEdit: observable,
|
||||||
|
canViewComments: observable,
|
||||||
setConfigOptions: action,
|
setConfigOptions: action,
|
||||||
setPermissionOptions: action
|
setPermissionOptions: action
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
isEdit = false;
|
isEdit = false;
|
||||||
|
canViewComments = false;
|
||||||
config = {};
|
config = {};
|
||||||
|
|
||||||
setConfigOptions (config) {
|
setConfigOptions (config) {
|
||||||
|
|
Loading…
Reference in a new issue