Commit f05ee648 authored by Alexander Yuzhin's avatar Alexander Yuzhin

[DE mobile] Fixed thumbnail size of paragraph styles.

parent 66a9960e
......@@ -55,7 +55,7 @@ define([
_paragraphInfo = {},
_paragraphObject = undefined,
_styles = [],
_styleTumbSize,
_styleThumbSize,
metricText = Common.Utils.Metric.getCurrentMetricName();
return {
......@@ -180,8 +180,8 @@ define([
return _styles || [];
},
getTumbSize: function () {
return _styleTumbSize || {width: 0, height: 0};
getThumbSize: function () {
return _styleThumbSize || {width: 0, height: 0};
},
// Handlers
......@@ -308,9 +308,9 @@ define([
}
_styles = [];
_styleTumbSize = {
width : styles.STYLE_THUMBNAIL_WIDTH / uiApp.device.pixelRatio,
height : styles.STYLE_THUMBNAIL_HEIGHT / uiApp.device.pixelRatio
_styleThumbSize = {
width : styles.STYLE_THUMBNAIL_WIDTH,
height : styles.STYLE_THUMBNAIL_HEIGHT
};
_.each(styles.get_MergedStyles(), function(style){
......
......@@ -121,7 +121,7 @@ define([
renderStyles: function () {
var me = this,
thimbSize = DE.getController('EditParagraph').getTumbSize(),
thumbSize = DE.getController('EditParagraph').getThumbSize(),
$styleList = $('#paragraph-list ul'),
template = _.template(
'<li>' +
......@@ -129,7 +129,7 @@ define([
'<input type="radio" name="paragraph-style" value="<%= name %>">' +
(Framework7.prototype.device.android ? '<div class="item-media"><i class="icon icon-form-radio"></i></div>' : '') +
'<div class="item-inner">' +
'<div data-name="<%= name %>" class="item-title style" style="background-image: url(<%= image %>); width:{0}px; height:{1}px; background-size:{0}px {1}px; background-repeat: no-repeat;"></div>'.format(thimbSize.width, thimbSize.height) +
'<div data-name="<%= name %>" class="item-title style" style="background-image: url(<%= image %>); width:{0}px; height:{1}px; background-size:{0}px {1}px; background-repeat: no-repeat;"></div>'.format(thumbSize.width, thumbSize.height) +
'</div>' +
'</label>' +
'</li>'
......
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