Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Dec 19, 2024
1 parent 92b750d commit 8e24a24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions apps/spreadsheeteditor/main/app/controller/PivotTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ define([

onCalculatedClick: function(btn, opts){
var me = this;
var pivotContextMenu = this.api.asc_getPivotInfo();
var pivotInfo = pivotContextMenu.pivot;
var pivotInfo = this.api.asc_getCellInfo().asc_getPivotTableInfo();
var pivotFieldIndex = pivotInfo.asc_getFieldIndexByActiveCell();
var error = pivotInfo.asc_hasTablesErrorForCalculatedItems(pivotFieldIndex);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ define([
return this.itemsList;
},

setSettings() {
this.pivotInfo = this.api.asc_getPivotInfo().pivot;
setSettings: function() {
this.pivotInfo = this.api.asc_getCellInfo().asc_getPivotTableInfo();
this.pivotFieldIndex = this.pivotInfo.asc_getFieldIndexByActiveCell();
this.itemsObject = this.pivotInfo.asc_getItemsObjectWithFormulas(this.pivotFieldIndex);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ define([

this.helpUrl = null;

this.pivotInfo = this.api.asc_getPivotInfo().pivot;
this.pivotInfo = this.api.asc_getCellInfo().asc_getPivotTableInfo();
this.pivotFieldIndex = this.pivotInfo.asc_getFieldIndexByActiveCell();

var fieldTitle = this.pivotInfo.asc_getCacheFields()[this.pivotFieldIndex].asc_getName();
Expand Down

0 comments on commit 8e24a24

Please sign in to comment.