[DE mobile] Fixed thumbnail size of paragraph styles.
This commit is contained in:
parent
66a9960e22
commit
f05ee648b0
|
@ -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>'
|
||||
|
|
Loading…
Reference in a new issue