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:
Bruno Heridet
2013-02-23 18:05:15 +00:00
parent 9f58a680c3
commit 0e92ca4a0e
2 changed files with 9 additions and 13 deletions

View File

@@ -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;