Skip to content

Commit

Permalink
Merge pull request '[PDF] Fix context menu' (#189) from fix/bugfix in…
Browse files Browse the repository at this point in the history
…to release/v8.3.0
  • Loading branch information
Julia Radzhabova committed Dec 18, 2024
2 parents 514aea6 + ed9f696 commit 3e72e1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions apps/pdfeditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -561,6 +563,10 @@ define([
}
},

onCountPages: function(count) {
this.documentHolder && (this.documentHolder._pagesCount = count);
},

onDialogAddHyperlink: function() {},

onShowMathTrack: function() {},
Expand Down
5 changes: 0 additions & 5 deletions apps/pdfeditor/main/app/controller/DocumentHolderExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3e72e1c

Please sign in to comment.