[DE mobile] Fixed thumbnail size of paragraph styles.
This commit is contained in:
parent
66a9960e22
commit
f05ee648b0
|
@ -55,7 +55,7 @@ define([
|
||||||
_paragraphInfo = {},
|
_paragraphInfo = {},
|
||||||
_paragraphObject = undefined,
|
_paragraphObject = undefined,
|
||||||
_styles = [],
|
_styles = [],
|
||||||
_styleTumbSize,
|
_styleThumbSize,
|
||||||
metricText = Common.Utils.Metric.getCurrentMetricName();
|
metricText = Common.Utils.Metric.getCurrentMetricName();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -180,8 +180,8 @@ define([
|
||||||
return _styles || [];
|
return _styles || [];
|
||||||
},
|
},
|
||||||
|
|
||||||
getTumbSize: function () {
|
getThumbSize: function () {
|
||||||
return _styleTumbSize || {width: 0, height: 0};
|
return _styleThumbSize || {width: 0, height: 0};
|
||||||
},
|
},
|
||||||
|
|
||||||
// Handlers
|
// Handlers
|
||||||
|
@ -308,9 +308,9 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
_styles = [];
|
_styles = [];
|
||||||
_styleTumbSize = {
|
_styleThumbSize = {
|
||||||
width : styles.STYLE_THUMBNAIL_WIDTH / uiApp.device.pixelRatio,
|
width : styles.STYLE_THUMBNAIL_WIDTH,
|
||||||
height : styles.STYLE_THUMBNAIL_HEIGHT / uiApp.device.pixelRatio
|
height : styles.STYLE_THUMBNAIL_HEIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
_.each(styles.get_MergedStyles(), function(style){
|
_.each(styles.get_MergedStyles(), function(style){
|
||||||
|
|
|
@ -121,7 +121,7 @@ define([
|
||||||
|
|
||||||
renderStyles: function () {
|
renderStyles: function () {
|
||||||
var me = this,
|
var me = this,
|
||||||
thimbSize = DE.getController('EditParagraph').getTumbSize(),
|
thumbSize = DE.getController('EditParagraph').getThumbSize(),
|
||||||
$styleList = $('#paragraph-list ul'),
|
$styleList = $('#paragraph-list ul'),
|
||||||
template = _.template(
|
template = _.template(
|
||||||
'<li>' +
|
'<li>' +
|
||||||
|
@ -129,7 +129,7 @@ define([
|
||||||
'<input type="radio" name="paragraph-style" value="<%= name %>">' +
|
'<input type="radio" name="paragraph-style" value="<%= name %>">' +
|
||||||
(Framework7.prototype.device.android ? '<div class="item-media"><i class="icon icon-form-radio"></i></div>' : '') +
|
(Framework7.prototype.device.android ? '<div class="item-media"><i class="icon icon-form-radio"></i></div>' : '') +
|
||||||
'<div class="item-inner">' +
|
'<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>' +
|
'</div>' +
|
||||||
'</label>' +
|
'</label>' +
|
||||||
'</li>'
|
'</li>'
|
||||||
|
|
Loading…
Reference in a new issue