Commit eac29cc9 authored by GoshaZotov's avatar GoshaZotov

draw custom pivot styles

parent 0e8c3fb8
...@@ -2777,20 +2777,33 @@ ...@@ -2777,20 +2777,33 @@
WorkbookView.prototype.af_getTablePictures = function (props, bPivotTable) { WorkbookView.prototype.af_getTablePictures = function (props, bPivotTable) {
var wb = this.model; var wb = this.model;
var t = this; var t = this;
bPivotTable = true;
var result = []; var result = [];
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
var styleThumbnailWidth = 61, styleThumbnailHeight = 46, row = 5, col = 5; var styleThumbnailWidth = 61, styleThumbnailHeight = 46, row = 5, col = 5;
var customStyles = wb.TableStyles.CustomStyles, defaultStyles = wb.TableStyles.DefaultStyles;
var defaultStyles = wb.TableStyles.DefaultStyles;
if(bPivotTable) if(bPivotTable)
{ {
styleThumbnailHeight = 49; styleThumbnailHeight = 49;
row = 8; row = 8;
customStyles = null;
defaultStyles = wb.TableStyles.DefaultStylesPivot; defaultStyles = wb.TableStyles.DefaultStylesPivot;
} }
var customStyles = {};
for(var i in wb.TableStyles.CustomStyles)
{
if(bPivotTable && wb.TableStyles.CustomStyles[i].pivot)
{
customStyles[i] = wb.TableStyles.CustomStyles[i];
}
else if(!bPivotTable && wb.TableStyles.CustomStyles[i].table)
{
customStyles[i] = wb.TableStyles.CustomStyles[i];
}
}
if (AscBrowser.isRetina) if (AscBrowser.isRetina)
{ {
styleThumbnailWidth = AscCommon.AscBrowser.convertToRetinaValue(styleThumbnailWidth, true); styleThumbnailWidth = AscCommon.AscBrowser.convertToRetinaValue(styleThumbnailWidth, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment