Merge pull request '[PDF] Fix context menu' (#189) from fix/bugfix into release/v8.3.0

This commit is contained in:
Julia Radzhabova
2024-12-18 15:11:26 +00:00
2 changed files with 6 additions and 5 deletions

View File

@ -169,6 +169,8 @@ define([
this.api = o;
if (this.api) {
(this.mode.isEdit === true) && this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onCountPages, this));
this.documentHolder.setApi(this.api);
}
@ -561,6 +563,10 @@ define([
}
},
onCountPages: function(count) {
this.documentHolder && (this.documentHolder._pagesCount = count);
},
onDialogAddHyperlink: function() {},
onShowMathTrack: function() {},

View File

@ -68,7 +68,6 @@ define([], function () {
this.api.asc_registerCallback('asc_onHideEyedropper', _.bind(this.hideEyedropper, this));
this.api.asc_registerCallback('asc_onShowPDFFormsActions', _.bind(this.onShowFormsPDFActions, this));
this.api.asc_registerCallback('asc_onHidePdfFormsActions', _.bind(this.onHidePdfFormsActions, this));
this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onCountPages, this));
if (this.mode.canComments) {
// for text
this.api.asc_registerCallback('asc_onShowAnnotTextPrTrack', _.bind(this.onShowTextBar, this));
@ -2325,10 +2324,6 @@ define([], function () {
}
};
dh.onCountPages = function(count) {
this.documentHolder && (this.documentHolder._pagesCount = count);
};
dh.onNewPage = function(item) {
this.api && this.api.asc_AddPage(item.value);