changed detail information image display from percent to horizontal and vertical mm
This commit is contained in:
parent
906fd54c41
commit
6fd68e0df0
2 changed files with 9 additions and 5 deletions
|
|
@ -317,11 +317,13 @@ $(function(){
|
|||
var endIdx = transform.local.indexOf(',', startIdx);
|
||||
var rot = parseFloat(transform.local.substring(startIdx, endIdx)) || 0;
|
||||
// if(!rot) rot = 0; // avoid NaN
|
||||
var scale = (Math.pow(transform.localMatrix.a,2) + Math.pow(transform.localMatrix.b,2)) * 100;
|
||||
var horizontal = self.px2mm(bbox.x2 - bbox.x);
|
||||
var vertical = self.px2mm(bbox.y2 - bbox.y);
|
||||
var id = svg.attr('id');
|
||||
var label_id = id.substr(0, id.indexOf('-'));
|
||||
$('#'+label_id+' .translation').text(tx.toFixed(1) + ',' + ty.toFixed(1));
|
||||
$('#'+label_id+' .scale').text(scale.toFixed(1) + '%');
|
||||
$('#'+label_id+' .horizontal').text(horizontal.toFixed() + 'mm');
|
||||
$('#'+label_id+' .vertical').text(vertical.toFixed() + 'mm');
|
||||
$('#'+label_id+' .rotation').text(rot.toFixed(1) + '°');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -216,8 +216,10 @@
|
|||
<div class="local_transformation muted">
|
||||
<i class="icon-move" title="{{ _('translation') }}"></i>
|
||||
<span class="translation" >0,0</span>
|
||||
<i class="icon-resize-full" title="{{ _('scale') }}"></i>
|
||||
<span class="scale" >100%</span>
|
||||
<i class="icon-resize-horizontal" title="{{ _('horizontal') }}"></i>
|
||||
<span class="horizontal" >0mm</span>
|
||||
<i class="icon-resize-vertical" title="{{ _('vertical') }}"></i>
|
||||
<span class="vertical" >0mm</span>
|
||||
<i class="icon-repeat" title="{{ _('rotation') }}"></i>
|
||||
<span class="rotation" >0°</span>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue