switched from properlySourceSizeTextArea() to a full CSS equivalent to optimize DOM repaint
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2463 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1192,11 +1192,18 @@ ul li.current {
|
||||
width: 96%;
|
||||
}
|
||||
|
||||
|
||||
#svg_source_editor form {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
bottom: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#svg_source_editor #svg_source_textarea {
|
||||
position: relative;
|
||||
width: 95%;
|
||||
top: 5px;
|
||||
height: 250px;
|
||||
height: 95%;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -2635,7 +2635,6 @@
|
||||
var str = origSource = svgCanvas.getSvgString();
|
||||
$('#svg_source_textarea').val(str);
|
||||
$('#svg_source_editor').fadeIn();
|
||||
properlySourceSizeTextArea();
|
||||
$('#svg_source_textarea').focus();
|
||||
};
|
||||
|
||||
@@ -2690,12 +2689,6 @@
|
||||
$('#svg_prefs').show();
|
||||
};
|
||||
|
||||
var properlySourceSizeTextArea = function() {
|
||||
// TODO: remove magic numbers here and get values from CSS
|
||||
var height = $('#svg_source_container').height() - 80;
|
||||
$('#svg_source_textarea').css('height', height);
|
||||
};
|
||||
|
||||
var saveSourceEditor = function() {
|
||||
if (!editingsource) return;
|
||||
|
||||
@@ -3154,10 +3147,6 @@
|
||||
}
|
||||
|
||||
$(window).resize(function(evt) {
|
||||
if (editingsource) {
|
||||
properlySourceSizeTextArea();
|
||||
}
|
||||
|
||||
$.each(win_wh, function(type, val) {
|
||||
var curval = $(window)[type]();
|
||||
workarea[0]['scroll' + (type === 'width' ? 'Left' : 'Top')] -= (curval - val)/2;
|
||||
|
||||
Reference in New Issue
Block a user