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

add asc_setThumbnailStylesSizes = function (width, height)

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