Commit bfdacc69 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add asc_setThumbnailStylesSizes = function (width, height)

parent 97370641
......@@ -125,6 +125,11 @@ var editor;
this.isShapeImageChangeUrl = false;
this.isTextArtChangeUrl = false;
// Styles sizes
this.styleThumbnailWidth = 112;
this.styleThumbnailHeight = 38;
this.formulasList = null; // Список всех формул
this._init();
......@@ -966,6 +971,11 @@ var editor;
}
};
spreadsheet_api.prototype.asc_setThumbnailStylesSizes = function (width, height) {
this.styleThumbnailWidth = width;
this.styleThumbnailHeight = height;
};
// Посылает эвент о том, что обновились листы
spreadsheet_api.prototype.sheetsChanged = function() {
this.handlers.trigger("asc_onSheetsChanged");
......@@ -1415,7 +1425,8 @@ var editor;
}
// Отправка стилей ячеек
this.handlers.trigger("asc_onInitEditorStyles", this.wb.getCellStyles());
this.handlers.trigger("asc_onInitEditorStyles",
this.wb.getCellStyles(this.styleThumbnailWidth, this.styleThumbnailHeight));
}
};
......@@ -3434,6 +3445,7 @@ var editor;
prot["asc_SetDocumentPlaceChangedEnabled"] = prot.asc_SetDocumentPlaceChangedEnabled;
prot["asc_SetFastCollaborative"] = prot.asc_SetFastCollaborative;
prot["asc_setThumbnailStylesSizes"] = prot.asc_setThumbnailStylesSizes;
// Workbook interface
......
......@@ -1679,12 +1679,12 @@
/** @constructor */
function asc_CStylesPainter() {
function asc_CStylesPainter(width, height) {
this.defaultStyles = null;
this.docStyles = null;
this.styleThumbnailWidth = 112;
this.styleThumbnailHeight = 38;
this.styleThumbnailWidth = width;
this.styleThumbnailHeight = height;
this.styleThumbnailWidthPt = this.styleThumbnailWidth * 72 / 96;
this.styleThumbnailHeightPt = this.styleThumbnailHeight * 72 / 96;
......
......@@ -1490,8 +1490,8 @@
return this.af_getTablePictures(this.model, this.fmgrGraphics, this.m_oFont, props);
};
WorkbookView.prototype.getCellStyles = function() {
var oStylesPainter = new asc_CSP();
WorkbookView.prototype.getCellStyles = function(width, height) {
var oStylesPainter = new asc_CSP(width, height);
oStylesPainter.generateStylesAll(this.model.CellStyles, this.fmgrGraphics, this.m_oFont, this.stringRender);
return oStylesPainter;
};
......
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