|
|
@ -1046,22 +1046,22 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
calculateCharDimensions: function() {
|
|
|
|
calculateCharDimensions: function() {
|
|
|
|
var $tmpChild = $('<span class="font-sample"><span class="line"><span class="char">MMMMMMMMMM</span></span></span>');
|
|
|
|
var $tmpChild = $('<span class="font-sample"><span class="line"><span class="char">MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM</span></span></span>');
|
|
|
|
this.getDOMNode().appendChild($tmpChild[0]);
|
|
|
|
this.getDOMNode().appendChild($tmpChild[0]);
|
|
|
|
var $span = $tmpChild.find('.char');
|
|
|
|
var $span = $tmpChild.find('.char');
|
|
|
|
|
|
|
|
|
|
|
|
var charDimensions = {};
|
|
|
|
var charDimensions = {};
|
|
|
|
|
|
|
|
|
|
|
|
$tmpChild.addClass('font-small');
|
|
|
|
$tmpChild.addClass('font-small');
|
|
|
|
charDimensions.small = { width: $span.width() / 10, height: $tmpChild.height() };
|
|
|
|
charDimensions.small = { width: $span.width() / 200, height: $tmpChild.height() };
|
|
|
|
|
|
|
|
|
|
|
|
$tmpChild.removeClass('font-small');
|
|
|
|
$tmpChild.removeClass('font-small');
|
|
|
|
$tmpChild.addClass('font-medium');
|
|
|
|
$tmpChild.addClass('font-medium');
|
|
|
|
charDimensions.medium = { width: $span.width() / 10, height: $tmpChild.height() };
|
|
|
|
charDimensions.medium = { width: $span.width() / 200, height: $tmpChild.height() };
|
|
|
|
|
|
|
|
|
|
|
|
$tmpChild.removeClass('font-medium');
|
|
|
|
$tmpChild.removeClass('font-medium');
|
|
|
|
$tmpChild.addClass('font-big');
|
|
|
|
$tmpChild.addClass('font-big');
|
|
|
|
charDimensions.big = { width: $span.width() / 10, height: $tmpChild.height() };
|
|
|
|
charDimensions.big = { width: $span.width() / 200, height: $tmpChild.height() };
|
|
|
|
|
|
|
|
|
|
|
|
$tmpChild.remove();
|
|
|
|
$tmpChild.remove();
|
|
|
|
|
|
|
|
|
|
|
|