Skip to content

Commit

Permalink
[PDF] For Bug 72451
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Jan 15, 2025
1 parent e968eb0 commit dcdf265
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions apps/pdfeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1178,21 +1178,23 @@ define([
'<div style="width:<%= options.itemWidth %>px; height:<%= options.itemHeight %>px;"></div>',
'</a>'
].join(''));
arr.forEach(function(item){
var menuItem = new Common.UI.MenuItem({
value: item.Type,
itemWidth: item.Image.width/Common.Utils.applicationPixelRatio(),
itemHeight: item.Image.height/Common.Utils.applicationPixelRatio(),
template: template
});
menu.addItem(menuItem, true);
if (menuItem.cmpEl) {
menuItem.cmpEl.find('div').append(item.Image);
menuItem.cmpEl.find('canvas').css({width: '100%', height: '100%'});
}
if (arr.length>0) {
arr.forEach(function(item){
var menuItem = new Common.UI.MenuItem({
value: item.Type,
itemWidth: item.Image.width/Common.Utils.applicationPixelRatio(),
itemHeight: item.Image.height/Common.Utils.applicationPixelRatio(),
template: template
});
menu.addItem(menuItem, true);
if (menuItem.cmpEl) {
menuItem.cmpEl.find('div').append(item.Image);
menuItem.cmpEl.find('canvas').css({width: '100%', height: '100%'});
}

});
this.toolbar.btnStamp.options.stampType = arr[0].Type;
});
this.toolbar.btnStamp.options.stampType = arr[0].Type;
}
}
},

Expand Down

0 comments on commit dcdf265

Please sign in to comment.